Reputation: 1691
I am trying to import a cURL
command that work in command prompt into POSTMAN
curl —cert-type p12 —v k -E "file.pem":"1111" --key "file.key" -v "https://blah" -H "Authorization: Bearer blahblahblah" -H "request-id: 123456" -H "someid: 999"
But i am getting weird message and not sure how to fix it
Error while importing Curl: Only the URL can be provided without an option preceding it. All other inputs must be specified via options.
Does anyone know how to make this import to work?
Upvotes: 13
Views: 39087
Reputation: 911
Not related to your query but posting for others who have similar issues: You can use the \
line break for separating options but not long strings. For example:
Valid:
curl https://google.com \
--data "some_field=text with no line break" \
--data "some_other_field=some other text"
Invalid:
curl https://google.com \
--data "some_field=text with line break"\
"second line of text for field"
Upvotes: 0
Reputation: 3680
Give this a try:
curl --cert-type p12 -E "file.pem":"1111" --key "file.key" -v -H "Authorization: Bearer blahblahblah" -H "request-id: 123456" -H "someid: 999" "https://blah"
I removed the extra "-v"
at the beginning along with the lurking "k"
just after it. Also moved the host string to the very end and was able to import the resulting curl command into Postman.
Upvotes: 5