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 :)
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
and then trying to make a fetch:
But this causes the server I'm hitting to respond with a 400 error ('Bad request').
Doing the same thing above, but using
node-fetchand just usingstreamdirectly (without wrapping it innew StreamBody(stream)for thebodyhas my server working.Is this a known issue/could you help me debug this? Would really appreciate it :)