<>Curl转python在线工具[转]
我只是工具的搬运工
https://curl.trillworks.com/ <https://curl.trillworks.com/>
可以将curl命令转为python代码块
如:
curl --request POST --url https://open.workec.com/auth/accesstoken --header
'cache-control: no-cache' --header 'content-type: application/json' --data '{
"appId": appId, "appSecret": "appSecret"}'
转化结果:
import requests headers = { 'cache-control': 'no-cache', 'content-type':
'application/json', } data = '{\t"appId": appId,\t"appSecret": "appSecret"}'
response = requests.post('https://open.workec.com/auth/accesstoken',
headers=headers, data=data)
github:https://github.com/NickCarneiro/curlconverter
<https://github.com/NickCarneiro/curlconverter>
热门工具 换一换