@fatcherjs/middleware-form-data
v3.0.0-alpha-10
Published
<a href="https://npmjs.com/package/@fatcherjs/middleware-form-data"><img src="https://img.shields.io/npm/v/@fatcherjs/middleware-form-data.svg" alt="npm package"></a> [![install size](https://packagephobia.com/badge?p=@fatcherjs/middleware-form-data)](htt
Downloads
559
Readme
@fatcherjs/middleware-form-data
Install
NPM
>$ npm install @fatcherjs/middleware-form-data
CDN
<script src="https://cdn.jsdelivr.net/npm/@fatcherjs/middleware-form-data/dist/index.min.js"></script>
Usage
import { fatcher } from 'fatcher';
import { formData } from '@fatcherjs/middleware-form-data';
fatcher('https://foo.bar', {
middlewares: [formData()],
headers: {
'Content-Type': 'multipart/form-data',
},
method: 'POST',
body: {
foo: 'bar',
test: 'a',
},
});