fix(core): update
This commit is contained in:
parent
ab48f11e83
commit
27770a8ad1
@ -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(...)
|
||||||
|
Loading…
Reference in New Issue
Block a user