-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
this may not be an issue with the library at all, but, I'm running into an issue with using this when I try to use a stream as my body.
I'm using the resumer package to create a readable stream from file data as so
const stream = resumer().queue(data).end()
and then trying to make a fetch:
const res = await fetch('url', {
method: 'POST',
headers: {
'Content-Type': 'application/octet-stream',
'Content-Length': data.length,
'custom-header': 'custom value'
},
body: new StreamBody(stream)
})
But this causes the server I'm hitting to respond with a 400 error ('Bad request').
Doing the same thing above, but using node-fetch
and just using stream
directly (without wrapping it innew StreamBody(stream)
for the body
has my server working.
Is this a known issue/could you help me debug this? Would really appreciate it :)
Metadata
Metadata
Assignees
Labels
No labels