发送http2请求

2023-02-20,,

有时服务器会检测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请求

发送http2请求的相关教程结束。

《发送http2请求.doc》

下载本文的Word格式文档,以方便收藏与打印。