Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import cURL command to POSTMAN

Tags:

curl

postman

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?

like image 443
Anand Avatar asked Oct 08 '19 16:10

Anand


2 Answers

enter image description here

please change the copy type as above and then import,

like image 167
Prageeth godage Avatar answered Nov 18 '22 02:11

Prageeth godage


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.

like image 3
xk0der Avatar answered Nov 18 '22 01:11

xk0der