1、get方法请求接口
url:显而易见,就是接口的地址url啦
headers:请求头,例如:content-type = application/x-/user/login"payload = {"phone":"1777982xxxx","pwd":"Ty+coun/mUj1saGV2OCK6p5kN9MNt8UznjaGsQ5A/nKPSH1NZW"}headers = {'Content-Type': 'application/json'}response = requests.request("POST", url, headers=headers, json = payload)print(response.text)print(response.json())print(response.status_code)print(response.url)print(response.headers)print(response.encoding)
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。