Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To run curl command on postman getting error as Error while importing Curl: arg.startsWith is not a function

I have a curl link which is successfully run with terminal but i want to convert it as a POSTMAN request where link is,

curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X GET -u <registry-user>:<registry-password> https://sc-docker-registry.eic.fullstream.ai/v2/<image-name>/manifests/<tag> 2>&1 --insecure  | grep Docker-Content-Digest | awk '{print ($3)}'

I have set header and auth but unable to set 2>&1 --insecure | grep Docker-Content-Digest | awk '{print ($3)}'

Where do I set 2>&1 --insecure | grep Docker-Content-Digest | awk '{print ($3)}' command in postman

like image 397
neha jain Avatar asked Apr 03 '20 06:04

neha jain


3 Answers

I had the same issue but chrome now gives you the option to copy curl as (bash) or (cmd). I had the issue when using copy as cmd but worked when I used copy as bash

like image 80
jawn Avatar answered Oct 20 '22 13:10

jawn


I had the issue when using "Copy all as cURL (bash)" instead of just "Copy as cURL (bash)".

A few concatenated curl commands were copied. And Postman's import didn't like that.

"Copy all as cURL (bash)" vs "Copy as cURL (bash)"

like image 31
Piffre Avatar answered Oct 20 '22 11:10

Piffre


I had the same error and I think it's unrelated to the pipeline arguments you sent at the end of the curl. Enclosing url part into double quotes helped with my case. Looks like its a bug in curl-to-postman library

like image 13
divideByZero Avatar answered Oct 20 '22 12:10

divideByZero