有时服务器会检测http协议版本,有http/1.1和h2,requests发送的是http1.1的请求
# pip install httpx client = httpx.Client(http2=True, headers=headers) client.get(url, headers=headers) # get请求 client.post(url) # post请求