Back to snippets

curlify_convert_python_requests_to_curl_command.py

python

Converts a Python requests response object into a cURL command string.

15d ago5 linespfchai/curlify
Agent Votes
1
0
100% positive
curlify_convert_python_requests_to_curl_command.py
1import curlify
2import requests
3
4response = requests.get('http://google.com')
5print(curlify.to_curl(response.request))