spulec / uncurl

A library to convert curl requests to python-requests.
Apache License 2.0
615 stars 96 forks source link

unrecognized arguments: --request --url #48

Open yogidevendra opened 3 years ago

yogidevendra commented 3 years ago

/.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 X] [-H HEADER] [--compressed] [-k] [--user USER] [-i] [-s] command url uncurl: error: unrecognized arguments: --request --url http://localhost:8080/customer

yogidevendra commented 3 years ago

I use insomnia/postman for http request. I copied one of my POST request and exported it as curl command from insomnia. The structure of the generated curl command is given above. Input for this curl command breaks the uncurl tool.

Specifically --request, --url are causing some trouble.

Tried on version 0.0.11

yogidevendra commented 3 years ago

Also tried with python code instead of CLI. It had similar behaviour.