Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support clob and blob object handling #7

Merged
merged 3 commits into from
Aug 13, 2024
Merged

support clob and blob object handling #7

merged 3 commits into from
Aug 13, 2024

Conversation

mazen-r
Copy link
Contributor

@mazen-r mazen-r commented Aug 12, 2024

No description provided.

src/client.ts Outdated
@@ -173,6 +209,10 @@ export class ScrapflyClient {
}
throw new errors.ApiHttpClientError(JSON.stringify(data));
}

const content = await this.handleLargeObjects(data.result)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for the python SDK, scrapfly/python-scrapfly#23 (comment)

src/client.ts Outdated
data.result = content
const content_format = data.result.format
if (content_format === 'clob' || content_format === 'blob') {
const content = await this.handleLargeObjects(data.result, content_format)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be simplified

Suggested change
const content = await this.handleLargeObjects(data.result, content_format)
data.result = await this.handleLargeObjects(data.result, content_format)

@mazen-r mazen-r merged commit a09d6b9 into main Aug 13, 2024
1 check passed
@mazen-r mazen-r deleted the clob-blob branch October 1, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants