by capableweb · 4y ago · 0 comments
Also, funny enough, the first command I tried didn't work as I expected, but thinking about it, it also seems hard to implement correctly. The cURL command I tried was "curl -v https://google.com/" but none of the implementations include verbose logging.
Weirdly, JSON is listed there, and it is absolutely not clear how JSON can be considered a language that can make HTTP requests. I wonder what client library that is?
import subprocess
import json
result = subprocess.run(['curlconverter', '--language', 'json', 'example.com'], capture_output=True, text=True)
command = json.loads(result.stdout)
print(command)