request.js/examples/postbin.js

16 lines
395 B
JavaScript
Raw Permalink Normal View History

2020-04-29 04:43:27 +00:00
'use strict';
var request = require('../');
request({
url: 'https://postb.in/1588134650162-6019286897499?hello=world'
//headers: { 'user-agent': false }
//headers: { 'user-agent': 'test/1.0' }
//userAgent: 'test/1.1' // not presently implemented
})
.then(function(resp) {
console.log(resp.body);
})
.catch(function(err) {
console.error(err);
});