uncurl icon indicating copy to clipboard operation
uncurl copied to clipboard

A library to convert curl requests to python-requests.

Results 23 uncurl issues
Sort by recently updated
recently updated
newest added

在django中使用,会报错,提示:usage: manage.py [-h] [-d DATA] [-b DATA_BINARY] [-X X] [-H HEADER] [--compressed] [-k] [--user USER] [-i] [-s] command url manage.py: error: unrecognized arguments: ![image](https://github.com/spulec/uncurl/assets/98260667/d5de5aee-a439-4698-8926-73d908a3dad7)

It appears that the tool was developed specifically for use in combination with "Copy as cURL" in Chrome Developer Tool. And it is a great tool for that :) I...

``` In [364]: _352 Out[364]: 'curl \'https://www.xxxxx.co/girl/?p=1\' \\\r\n -H \'authority: www.xxxxxx.co\' \\\r\n -H \'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\' \\\r\n -H \'accept-language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,ru;q=0.5,ja;q=0.4,zh-TW;q=0.3,it;q=0.2,de;q=0.1\' \\\r\n -H \'cookie: __51vcke__JNmlfXHHIrHMZgLq=fa5cf0f7-5ae2-5737-87d1-0d695a4a07fe; __51vuft__JNmlfXHHIrHMZgLq=1682497044373; gcha_sf=1684570941; __51uvsct__JNmlfXHHIrHMZgLq=2; jpx=18; __vtins__JNmlfXHHIrHMZgLq=%7B%22sid%22%3A%20%2264bb2c35-db8b-5451-943e-abf35a81d9b8%22%2C%20%22vd%22%3A%2016%2C%20%22stt%22%3A%20291193%2C%20%22dr%22%3A%206024%2C%20%22expires%22%3A%201684573034394%2C%20%22ct%22%3A%201684571234394%7D\' \\\r\n -H...

when i run curl -T thefile.txt ...., I get unrecognized arguments -T

When there's binary in the curl request, sometimes the quotation marks screw up shlex and it won't parse properly. For example curl -i -s -k -X $'POST' \ -H $'Host:...

When an empty string (`curl_command = ''`) is passed to `uncurl.parse_context(curl_command)` a python script ends abnormally showing this error: ``` usage: [-h] [-d DATA] [-b DATA_BINARY] [-X X] [-H HEADER]...

/.venv/bin/uncurl "curl --request POST \ --url http://localhost:8080/customer \ --header 'Content-Type: application/json' \ --data '{ "customer": { "customer_id": "1", "customer_type": "regular" } }'" usage: uncurl [-h] [-d DATA] [-b DATA_BINARY] [-X...

``` $ uncurl "curl 'https://example.com/' -F '[email protected];type=image/JPEG' -H 'X-Generate-Renditions: all' -H 'X-Create-Asset-Sync: 1' -H 'Authorization: Bearer xyz' -H 'X-Read-Meta: none'" usage: uncurl [-h] [-d DATA] [-b DATA_BINARY] [-H HEADER] [--compressed]...

enhancement

Tried both copy as curl-bash and copy as curl-cmd (working on windows machine here, ananconda 3) Here is the call: uncurl "curl 'https://www.bestbuy.com/cart/api/v1/addToCart' \ -H 'authority: www.bestbuy.com' \ -H 'accept:...