Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node js fetch

const fetch = require('node-fetch');	//npm install node-fetch

fetch('https://httpbin.org/post', {
  method: 'POST',
  body: 'a=1'
})
  .then(res => res.json())
  .then(json => {
	// Do something...
  })
  .catch(err => console.log(err));
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #node #js #fetch
ADD COMMENT
Topic
Name
6+7 =