Sending an HTTP request

API interface function layout

API request parameters

The Header parameter

You can set or import Header parameters, and cookies are also set in Header

The Query parameter

Query supports the construction of URL parameters as well as RESTful PATH parameters such as id.

Body parameters

Body provides three types of form-data/X-www-form-urlencoded/RAW, and each type provides three different UI interfaces

1) Switch to X-www-form-urlencoded when you need to submit forms

2) Switch to form-data when you need to submit a form with a file

3) When you need to send JSON objects or other objects, switch to the corresponding RAW type

API Request Response

After clicking the send button, if there is data returned, the returned data, response time, response code, Cookie and so on will be displayed.

Note: The returned data defaults to Pretty mode for viewing in JSON XML format. You can view other types by switching native or preview mode.

Click Share document

Copy and open the document address to see the complete interface documentation.

This article mainly explains some matters needing attention.

Fill in the description of the request parameters

For the header, query, and form-data and urlencode body arguments, we fill in the parameter descriptions as follows:

As shown in the figure, for a parameter filled in, we can quickly import the description in the new interface by clicking the ♦️ box symbol behind the parameter description, without repeating typing.

For the body parameter of the RAW type, we can fill in the description of the parameter by clicking “Extract Field and Description” :

For parameters that have already been filled in, APIPOST automatically matches the description without having to fill in again.

Fill in the description of the response parameters

Many newbies are puzzled why APIPOST does not share a document with a successful response example or an error response example, because APIPOST does not take data from a real-time response after being sent as a response example.

You need to manually import or copy the real-time response results into the corresponding success response samples and error response samples.

Fill in the field description and the body parameter of raw type. We can click “Extract field and Description” to fill in the description of the parameter.

Similarly, the APIPOST automatically matches the description of parameters that have already been filled in without having to fill in again.