1. Home
  2. Docs
  3. Custom API
  4. Request Method

Request Method

You can select the request method by selecting it in the dropdown as shown below

customapi_method

What Request Methods are available in Custom API?

Currently, the following request types are available

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE

How to send Request body for POST (Or other) requests?

If you select POST (or any other request type other than GET), you will get the Request Payload input box.

customapi_method_post

The request payload should only contain JSON formatted data. For Eg: {“a” : “b” }. If any other data format is entered, an error will be returned. 

You can use any JSON validator online before pasting the data in the text box. 

How to send API credentials in the Request body?

If you want to save the queries, we highly recommend you use the environment variable. So you can create a {{secret_key}} variable and use it in the request body.

For Eg: {“username” : {{username}}, “password” : “{{secret_key}}” }

 

Leave a Reply

Your email address will not be published. Required fields are marked *