2.0.0 • Published 2 years ago

@fatcherjs/middleware-form-data v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@fatcherjs/middleware-form-data

A middleware for consuming payload to form data

codecov install size

Install

NPM

>$ npm install @fatcherjs/middleware-form-data

CDN

<script src="https://cdn.jsdelivr.net/npm/@fatcherjs/middleware-form-data/dist/form-data.min.js"></script>

Usage

import { formData } from '@fatcherjs/middleware-form-data';
import { fatcher } from 'fatcher';

fatcher({
    url: '/bar/foo',
    middlewares: [formData()],
    payload: {
        bar: 'foo',
    },
    headers: {
        'Content-Type': 'multipart/form-data',
    },
})
    .then(res => {
        console.log(res);
    })
    .catch(err => {
        console.error(error);
    });

License

LICENSE

1.7.2

2 years ago

1.8.0

2 years ago

2.0.0

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago