Copyright statement: Please indicate the source of the author (Dugushangliang dugushangliang) for reprinting: https://blog.csdn.net/dugushangliang/article/details/90473735
import requests
url='http://www.baidu.com'
#Use requests.request(method, url, **kwargs) below
re=requests.request('GET',url)

Verified and usable.
We try to pass in a dictionary, first with the params parameter.

The result is:

The highlight is in url and args.
We also use the get method to pass the dic dictionary to data for a try.

The highlight is still in args and url. To my surprise, the dic dictionary was not passed in.
This is because:

params is used to send the query string, and data is used to send the text. The characteristics of the post method and the get method are: these two parameter post methods can be used, and the get method can only send query strings, not text.
Next, try the post method:

The above is to use the data parameter to pass the dictionary, the highlight is in the form.
Try again to pass this dictionary with the params parameter:

The highlight is in url and args.
Dugushangliang-work
Params is added to the URL request string for GET requests. Data is added to the request (Body) for POST request. Take an example: the address of the KFC JSON () returns the dictionary type, which can...
1. Get request data placed in Params 2. POST requests will have two ways to pass on: Params form: This writing parameter will be placed on the path, the parameters will be string type, what the consol...
axios send post request Why do you only mention the POST request here? Because the GET requests put the parameters under the Params property, they did not choose. During the sending process, the param...
1. In the HTTP request process, the get request: the form parameter is appended to the url in the form of name=value&name1=value1; 2, post request: the form parameters are in the request body, but...
AXIOS Send the Difference of PARAMS and DATA When using AXIOS, the configuration options contain both params and data the difference: Because Params is the request string added to the URL, it is used ...
axios difference data and request params Parameters: two arrays, a string, to the backed-induced blog. When using axios, noticed configuration options include both params and data, I thought they were...
Now this project uses axios for the first time, because the parmas I used to send to the seniors and sisters I read before, because I didn’t think about it carefully at the time, and I didn&rsqu...
When transferring data with the server, the GET and POST methods are usually used for parameter submission, and the method of parameter submission usually depends on the way the server receives the da...
1. Common methods of the requests library 1) This is a way of use, that is, there is no headers, only parameters. 2) The second way of use is to add Headers (the browser that can be added, identity au...
Query should be introduced by path, params should be introduced with name, and the receiving parameters are similar. Params can only use route to introduce routes Note: When params passes parameters, ...