fix(core): update

This commit is contained in:
Philipp Kunz 2020-08-24 12:04:10 +00:00
parent ab48f11e83
commit 27770a8ad1

View File

@ -48,7 +48,7 @@ Use TypeScript for best in class instellisense.
import * as smartrequest from 'smartrequest' import * as smartrequest from 'smartrequest'
// simple post // simple post
let options: smartrequest.ISmartRequestOptions = { // typed options const options: smartrequest.ISmartRequestOptions = { // typed options
headers: { headers: {
"Content-Type": "application/json" "Content-Type": "application/json"
"Authorization": "Bearer token" "Authorization": "Bearer token"
@ -66,7 +66,7 @@ smartrequest.request('https://example.com', options).then(res => {
console.log(err) console.log(err)
}) })
// dedicated JSON metods are available: // dedicated JSON methods are available:
smartrequest.getJson(...) smartrequest.getJson(...)
smartrequest.postJson(...) smartrequest.postJson(...)
smartrequest.putJson(...) smartrequest.putJson(...)