serviejs/popsicle

Exception 'Unknown body type' sending ArrayBuffer from node.js app

Closed this issue · 1 comments

With this node code:

`var popsicle = require('popsicle');

const buffer = new ArrayBuffer(8);
const uint8 = new Uint8Array(buffer);
uint8.set([1, 2, 3], 3);

const res = popsicle.fetch('http://localhost:52128/arraybuffer',
{
method: 'POST',
body: buffer,
omitDefaultHeaders: true,
headers: {'Content-Type':'application/octet-stream'}
}).then((res) => console.log(res));`

we get the 'Unknown body type' exception (tested with node v10.16.0)

Thanks

Thanks for the flag! This has been resolved with the latest release.