HTTP Client Methods and Usage
Dvori simplifies making HTTP requests by providing straightforward methods that correspond to the HTTP verbs you’re already familiar with. This guide covers how to use each method, along with examples to get you started.
GET Requests
Use the get
method to retrieve data from a specified resource.
With Query Parameters
Easily include query parameters by adding a params
object.
POST Requests
The post
method is used to submit an entity to the specified resource, often resulting in a change in state or side effects on the server.
PUT Requests
Use put
to replace all current representations of the target resource with the request payload.
DELETE Requests
The delete
method removes the specified resource.
PATCH Requests
patch
is used to apply partial modifications to a resource.
HEAD Requests
The head
method retrieves the headers of a resource, without the body.
OPTIONS Requests
Use options
to describe the communication options for the target resource.
Remember to refer to the API reference for more detailed information on method parameters and advanced usage scenarios.