1、先在postman里面调试通这个接口
2、点击code
3、选择想要的格式
这里我选择的是python,导出代码为:
import requests
url = "https://www.v2ex.com/api/nodes/show.json"
querystring = {"id":"90","name":"python"}
payload = ""
headers = {
'cache-control': "no-cache",
'Postman-Token': "dc08231e-7ee7-4f84-adce-ebeba0b69a17"
}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)