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

AddRequest should support binary Buffer payload #2786

Open
Gilc83 opened this issue Dec 30, 2024 · 0 comments
Open

AddRequest should support binary Buffer payload #2786

Gilc83 opened this issue Dec 30, 2024 · 0 comments
Labels
feature Issues that represent new features or improvements to existing features. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@Gilc83
Copy link

Gilc83 commented Dec 30, 2024

Which package is the feature request for? If unsure which one to select, leave blank

@crawlee/core

Feature

I'm trying to submit HTTP POST requests and add them directly to the queue, but when adding a request like this:
let response = await requestQueue.addRequest({
url: interceptedUrl,
method: method,
payload: postData,
...

The payload parameter accepts only string postData, and not a Buffer, while in multipart file upload scenarios, the uploaded file can be a binary one, requiring the payload to be either a string or a Buffer.

Motivation

I'm using Crawlee to write a web spider, including file upload and it is not supported.

Ideal solution or implementation, and any additional constraints

Just change the type of payload to string, undefined or Buffer, and support Buffer along the way. At least in Playwright who also supports it.

Alternative solutions or implementations

No response

Other context

No response

@Gilc83 Gilc83 added the feature Issues that represent new features or improvements to existing features. label Dec 30, 2024
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues that represent new features or improvements to existing features. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

1 participant