assaf / zombie

Insanely fast, full-stack, headless browser testing using node.js
http://zombie.js.org/
MIT License
5.65k stars 518 forks source link

fetch() can't handle Blob as body #1230

Open belden opened 1 year ago

belden commented 1 year ago

This client code:

const jsonString = JSON.stringify({my: 'payload'});
const blob = new Blob([jsonString], {type: 'text/plain;charset=utf-8'});
navigator.sendBeacon('https://my-dev-server', blob);

triggers a TypeError in zombie, originating here

https://github.com/assaf/zombie/blob/e6cf0f81368349392f433c7b5122fb568b9b30b0/src/fetch.js#L208