Reputation: 41
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
Upvotes: 4
Views: 12827
Reputation: 510
--compressed not supported remove it from the end
and use the "Copy as CURL (bash)" option
Upvotes: 5
Reputation: 344
When Copying a request from Chrome Dev Tools, use the "Copy as CURL (bash)" option to ensure that Postman will accept the format.
Upvotes: 0
Reputation: 556
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
Upvotes: 2