Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failure to Import Curl in Postman - optionless arguments found

Tags:

curl

postman

I've tried pasting a raw curl into Postman using File >> Import >> Paste Raw Text. However, I get the error: Error while importing Curl: 2 option-less arguments found. Only one is supported (the URL). Below is the curl.

curl 'https://example.com/api/dataexport/user_token' -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -H 'Accept: application/vnd.boostr.dataexport' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Connection: keep-alive' --data-binary '{"auth":{"email”:”[email protected]”,”password”:”example”}}’ --compressed
like image 602
Michael Chong Avatar asked Sep 04 '25 17:09

Michael Chong


2 Answers

--compressed not supported remove it from the end

and use the "Copy as CURL (bash)" option

reference

like image 190
Tarek Adra Avatar answered Sep 07 '25 19:09

Tarek Adra


The quotation marks in the value for --data-binary need to be replaced from (typographic quotes) to " (ASCII quotes).

Try importing this:

curl 'https://example.com/api/dataexport/user_token' -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -H 'Accept: application/vnd.boostr.dataexport' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Connection: keep-alive' --data-binary '{"auth":{"email":"[email protected]","password":"example"}}' --compressed
like image 37
Anant Naugai Avatar answered Sep 07 '25 17:09

Anant Naugai