A tool render requests object to curl
Project description
py2curl
将 python 的 requests 代码转换成 curl 命令
安装
pip install py2curl
使用
import requests
import py2curl
req = requests.get('https://tendcode.com')
result = py2curl.render(req.request)
print(result)
### curl -k -v -X GET -H "Accept: */*" -H "Accept-Encoding: gzip, deflate" -H "Connection: keep-alive" -H "User-Agent: python-requests/2.19.1" https://tendcode.com/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py2curl-1.0.9.tar.gz
(2.6 kB
view hashes)