We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
OPTIONS stream request requires body: '' to finish the request successfully.
body: ''
const str = got.stream('https://www.jsdelivr.com', { "method": "OPTIONS", "body": '', // `RequestError: socket hang up` without that parameter. });
Either RequestError: socket hang up, or unnecessary body: '' should be passed.
RequestError: socket hang up
Should work fine without body: '' since OPTIONS request doesn't have body.
const str = got.stream('https://www.jsdelivr.com', { "method": "OPTIONS", }); str.on('socket', () => { console.log('socket'); }); str.on('end', () => { console.log('end'); }); str.on('retry', (...args) => { console.log('retry', ...args); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
OPTIONS stream request requires
body: ''
to finish the request successfully.Actual behavior
Either
RequestError: socket hang up
, or unnecessarybody: ''
should be passed.Expected behavior
Should work fine without
body: ''
since OPTIONS request doesn't have body.Code to reproduce
Checklist
The text was updated successfully, but these errors were encountered: