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

feat: Support sindresorhus's got response stream #562

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

icecreamparlor
Copy link

@icecreamparlor icecreamparlor commented Apr 4, 2024

Added Support for sindresorhus's got stream response

Until now, form-data supports Node.js http-response stream and mikeal's request stream.

With this PR, we can use form-data with sindresorhus's got stream response.

import got from 'got';
import FormData from 'form-data';

var form = new FormData();

form.append('my_field', 'my value');
form.append('my_buffer', new Buffer(10));
form.append('my_logo', got.stream('http://nodejs.org/images/logo.png'));

Closes #522

@icecreamparlor icecreamparlor changed the title feat: Support Got response stream feat: Support sindresorhus's Got response stream Apr 4, 2024
Copy link

@dleo9307 dleo9307 left a comment

Choose a reason for hiding this comment

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

LGTM!

@icecreamparlor icecreamparlor changed the title feat: Support sindresorhus's Got response stream feat: Support sindresorhus's got response stream Apr 4, 2024
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.

how the stream from 'got' Lib use for form-data?
2 participants