You can send PUT request in NativeRest to connect to APIs you are working with. Your requests can retrieve, add, delete, and update data. The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), whereas successive identical POST requests may have additional effects, akin to placing an order several times.
Make sure you've downloaded and installed the NativeRest desktop application. When you're ready, open the NativeRest desktop app and send your first API request.
To send PUT request, select a request method from the list on the left. In PUT request you can send the body, parameters and headers.
Modify any HTTP method or GraphQL request with the following options.
โ Body Select a body type from the Body dropdown menu on the tab. Add content
that you want to send in the body of the request.
โ Auth The authentication for the request. Select an authentication type from
the Auth dropdown menu on the tab.
โ Params Add query parameters to your request URL.
โ Header Add a header to your request. For example, Content-Type:
application/json.
A request includes an HTTP request method and the URL of the API endpoint. The method indicates the action you want the API to perform. Here are some of the most common methods:
Some APIs require you to send particular headers along with requests, typically to provide more metadata about the operation you are performing. You can set these up in the Headers tab. Enter any key-value pairs you need and NativeRest will send them along with your request. As you enter text, NativeRest prompts you with common options you can use to autocomplete your setup, such as Content-Type.
You used NativeRest to send an API request and got a response from the API server. It's okay to take a moment to sit back and reflect on how cool that is!
If the target resource does not have a current representation and the PUT request successfully creates one, then the origin server must inform the user agent by sending a 201 (Created) response.
f the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server must send either a 200 (OK) or a 204 (No Content) response to indicate successful completion of the request.