A module for modern HTTP/HTTPS requests with support for form data, file uploads, JSON, binary data, streams, and more.
dist | ||
test | ||
ts | ||
.gitignore | ||
.gitlab-ci.yml | ||
package.json | ||
README.md | ||
tslint.json |
smartrequest
dropin replacement for request
Availabililty
Status for master
Usage
Use TypeScript for best in class instellisense.
import * as smartrequest from 'smartrequest'
// simple post
let options: smartreqest.ISmartRequestOptions = { // typed options
headers: {
"Content-Type": "application/json"
"Authorization": "Bearer token"
},
requestBody: {
key1: 'value1',
key2: 3
}
}
smartrequest.post('https://example.com', options)