python发送POST请求和GET请求

1.POST请求(携带参数)

import requests

url = "https://www.qiuzhipai.com/"

data = {
    "phone":"18312884980",
    "smscode":"11516",
}

headers = {'Content-type': 'application/x-www-form-urlencoded'}

response = requests.post(url, data, headers=headers)

print(response.content.decode())

2.GET请求

待完善

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章