fetch-stringify
With this module you could easily set body and proper headers when using fetch api.
installation
npm i --save fetch-stringify
usage
; //use IE8+ polyfill;var qs = ;var { //default to use JSON.stringify if you didn't set this return body: qs type: 'application/x-www-form-urlencoded;charset=UTF-8' }; // or set default function to fetch.stringifyfetchstringify = qsStringify;;
license
MIT