Http request post and get parameter data format

Post: Generally used to submit the form, the request data is wrapped in the body, which is safe;
Get: Generally used to obtain the data information, of course, it can also be used to obtain the form, the request parameter is in the url, which is not safe;

Content-Type

contype-Type is used to specify the request information of upload parameters in different formats;
content-Type commonly used data types:
1. application/json, use it as the request header to tell the server that the message body is a serialized JSON string.
2. application/x-www-form-urlencoded, the default data format of the form, the submitted data is encoded according to key1=val1&key2=val2, and both key and val are URL transcoded. (Ajax default Content-Type type)

responseType

responseType is used to specify the type of response data returned by the background.

Guess you like

Origin blog.csdn.net/qq_40976428/article/details/108348698
Recommended