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請求

待完善

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