Cookie format: key=value;key2=value2;key3=value3
Note information will be stored in a cookie
Introduction of HTTP Request Tester
1. Request type support
This tool supports the following request types:
- GET : Getting data from the server.
- POST : Send data to the server.
- PUT : Replace a specified resource on the server.
- DELETE : Delete a specified resource on the server.
- HEAD : Get header information without returning specific content.
- TRACE : Echo the request received by the server, mainly used for testing.
- OPTIONS : Query the request methods supported by the server.
- PATCH : Partially modify a resource.
2. Cookie Filling Manually
When accessing an interface that requires login, you can manually fill in the following cookiesCookie Cookies can be filled manually when accessing interfaces that require login. Alternatively, you can access the domain name of the interface in Google Chrome by pressingF12 Open Developer Tools, find the corresponding request in theNetwork panel, find the corresponding request, directly copy the cookie information and fill it into the cookie input box of this tool, so that you can easily bring up the cookie to make a request without manual input.
3. Custom Header
You can manually enter the customizedHeader information manually, or you can get the requested header in theNetwork panel of your browser, copy and paste the header information directly into the Header input box of this tool.
4. HTTP Request Overview
Testing and using the HTTP interface begins with understanding the basic concepts of HTTP requests:
- HTTP Request Generally speaking, the client sends data to the server via the HTTP protocol, and the server parses the information sent by the client according to the protocol.
- Commonly used request parameters:
- GET Parameters GET Parameters: The URL is spliced after the request and is concatenated with a
?
symbol. For example:https://yours.tools/ ?a=b&c=d
For example, the part after the question mark is the GET request parameter.
- POST Parameters The POST parameters are not displayed in the URL, but in the body of the HTTP request.
key=value
The POST parameters can be passed in the form of a string, or in JSON or XML format. POST parameters can be passed in the form ofContent-Type The server parses the request according to different Content-Types.
Common Content-Type Types
- application/x-www-form-urlencoded : Commonly used for form submissions, the parameters are in the format of
"a=b&c=d"
The server is able to parse them automatically.
- application/json When sending JSON format data, you need to set the Content-Type in the request header, usually the server will read the stream in the request body to process the data.
5. Request and Response Header
- Request Header The header information sent by the client when requesting, it is used to inform the server about the client's situation, for example, whether it supports compression, accepted language, User-Agent, Referer, etc. Meanwhile, Cookie is also included in the request header.
- Response Header : The header information returned by the server to the client, including the request status code, caching policy, set cookies, etc. The browser receives the response and then sends it to the client. After receiving the response, the browser will set this information accordingly.