Home > Blockchain >  e.startsWith Is Not A Function Error When Importing cURL Into Postman
e.startsWith Is Not A Function Error When Importing cURL Into Postman

Time:12-01

I'm trying to import this cURL example into Postman via Import > Raw Text:

curl https://invoice-generator.com \
  -H "Accept-Language: fr-FR" \
  -d from="Invoiced, Inc." \
  -d to="Acme Corp." \
  -d logo="https://invoiced.com/img/logo-invoice.png" \
  -d number=1 \
  -d currency=eur \
  -d date="Feb 9, 2015" \
  -d due_date="Feb 16, 2015" \
  -d items[0][name]="Starter plan monthly" \
  -d items[0][quantity]=1 \
  -d items[0][unit_cost]=99 \
> invoice.pdf

(taken from here)

But I'm getting an error:

Error while importing Curl: e.startsWith Is Not A Function

I've seen posts about this error while running cURL in Postman but obviously this is a different situation and I'm not sure how to resolve this one?

CodePudding user response:

The last line of this cURL command exports the output to a file called invoice.pdf. Postman can't do that, at least, not in this way.

Postman's cURL import is, in my experience, flaky; make sure that all your quotes are double non-curly quotes, and delete all the 's as well as the > invoice.pdf and it might work OK.

  • Related