Optional
abilityOptional
callProtected
headersStatic
toSend a HTTP POST request to the specified url. Optionally it is possible to chain definitions for header sand data as well as the expected response type.
the URL of the target.
a new Post instance
simple request
Post.to('https://my-fancy-url.com');
with chained definitions
Post.to('https://my-fancy-url.com')
// add headers
.withHeaders({
key: value,
})
// add data
.withData({
key: value,
})
// define expected response format
.withResponseFormat('text');
Set the format the response body should be returned as.
the format of the response body.
the Post instance
Generated using TypeDoc
Send a HTTP POST Request.