美文网首页
2020-02-06 python3以post 和GET方式提

2020-02-06 python3以post 和GET方式提

作者: netppp | 来源:发表于2020-02-06 17:45 被阅读0次

post

import  requests

postdata={'name':'xiaochong'}

r=requests.post('http://xxxxxx(替换成您的网址)',data=postdata)

print(r.text)

GET

import  requests

params={'appkey':'ding2jf8ixj9vm9zar4b','appsecret':'ZX6KIqFnv0A6q6CYq2iUqdl8ywmmwpT6bG5-LYC4bjKxA3EJTWe9C-7qMOSMjhZn'}

r=requests.get('https://oapi.dingtalk.com/gettoken?',params=params)

print(r.text)

wwwwwwwwwww

import requests

url = "http://test/api/auth/me?token=xxx"

 res = requests.get(url)

 print(res.text)

wwwwwwwwwwwwwwwww

import requests

url = "http://test/api/auth/me"

params = {"token":"xxxx"}

res = requests.get(url=url,params=params)

print(res.text)

https://blog.csdn.net/chenjineng/article/details/79281127

相关文章

网友评论

      本文标题:2020-02-06 python3以post 和GET方式提

      本文链接:https://www.haomeiwen.com/subject/syyuxhtx.html