We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a32f82 commit 7218a7fCopy full SHA for 7218a7f
src/client.ts
@@ -116,14 +116,19 @@ export class ScrapflyClient {
116
throw e;
117
}
118
119
- const content: string = await response.text();
120
- result.content = content;
+ let content;
+
121
if (format === 'clob') {
122
+ content = await response.text();
123
result.format = 'text';
124
125
126
if (format === 'blob') {
127
+ content = Buffer.from(await response.arrayBuffer());
128
result.format = 'binary';
129
130
131
+ result.content = content;
132
return result;
133
134
0 commit comments