spulec/uncurl

uncurl doesn't support --location, --request flags.

phamtrongngh opened this issue · 1 comments

curl --location --request GET 'localhost:8000/cs/api/user/info/?user_id=c0f8f66d-bd4e-4305-a536-6de3b2da926c'
--header 'Authorization: Token 92c7c270bd43e79a6546d8b80de1c1ce4e593724'
--header 'Cookie: csrftoken=tmbcb5KPaZFBU4PavGa4Z5hTrrbcL1eSlgrxGVqXsHV8njXVuIRZdxJK1NVmLvgP'

This is a valid curl. But when I passed it to uncurl.parse_context(), it threw an error:
"unrecognized arguments: --location --request ........."

  • if you use GET, you could just drop --location --request or you can use -X
  • If you use other HTTP Methods, you could use -X to replace --location --request.

It works on me. version: 0.0.11. I hope it is helpful