Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

url encoded body in node.js

//by default object is change into json but in case cause content-type is "application/json"
// but in headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
//we use url package of node.js.
const url = require('url');
const params = new url.URLSearchParams({ foo: 'bar' });
axios.post('http://something.com/', params.toString());
Source by axios-http.com #
 
PREVIOUS NEXT
Tagged: #url #encoded #body
ADD COMMENT
Topic
Name
5+5 =