0.1.4 • Published 6 years ago

json-post v0.1.4

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

json-post

How to post JSON in NodeJS.

You know those simplest things ever not properly documented online? That!

const jsonPOST = require('json-post');
// or import jsonPOST from 'json-post'

jsonPOST(
  'https://whatever:5000/seriously',
  {hello: 'world'}
  // optionally extra headers {...}
).then(
  console.info,
  console.error
);

That's literally it.

... and what about browsers ?

You can use this MDN fetch example to post JSON data.

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago