1.0.1 • Published 7 years ago

form-urlencoded-post v1.0.1

Weekly downloads
6
License
ISC
Repository
github
Last release
7 years ago

form-urlencoded-post

Jquery post alternative for application/x-www-form-urlencoded post requests.

Can't use jquery for size reasons? Because you can't access the dom? Trying to post in React Native? We gotchu..

Installation

$ npm install --save form-urlencoded-post

Example

import {post} from 'form-urlencoded-post';

let user = {name:'joe', skills:['dank memes']};

post('https://www.myapiurl.com/createUser', user).then(res => {
    console.log("response:", res)
})

The post() call will return a thenable from a fetch() call.

You can also just add the code to your source if you need some customization. At the moment it's only 16 lines.