mirror of https://github.com/sundowndev/http.git
1.1 KiB
1.1 KiB
HTTP Methods
:::tip Usage See here for usage information for below methods. :::
:::tip Note
Each http method returns a Promise
:::
delete
get
head
- arguments:
(url, options?)
- resolves: Response
- rejects:
Error
These methods corresponds to the similar named HTTP/1.1 methods.
patch
post
put
- arguments:
(url, body?, options?)
- resolves: Response
- rejects:
Error
These methods corresponds to the similar named HTTP/1.1 methods.
$delete
$get
$head
- arguments:
(url, options?)
- resolves:
JSON
- rejects:
Error
These $
-prefixed convenience methods always return the requested content as JSON
.
$patch
$post
$put
- arguments:
(url, body?, options?)
- resolves:
JSON
- rejects:
Error
These $
-prefixed convenience methods always return the requested content as JSON
.