1

I'm following this tutorial https://www.youtube.com/watch?v=65NhO5xxSZc&list=LL&index=9&t=150s on building an external adapter for a chainlink node. After following the instructions and listening to port 8080 on my CMD terminal, I type the curl command on another CMD terminal and get the following error: enter image description here

The template that I'm using : https://github.com/PatrickAlphaC/CL-EA-NodeJS-Template

What I have tried so far:

  • double-checked all the modules installed
  • switched to my desktop computer
  • deleted and re-copied the repo
  • tried on Postman with same error
heyooo12
  • 139
  • 3
  • 16

1 Answers1

1

If you're using a windows machine, try surround the JSON in double-quotes instead of single quotes, and try replace the internal double quotes with escape characters. ie:

-d "{\"param\":\"value\"}"

reference: How to send double quote in -d parameter for curl.exe?

  • Aha, ok...so now my curl is : curl -X POST -H "content-type:application/json" "http://localhost:8080/" --data '{ "id": 0, "data": "{\"from\": \"ETH\", \"to\": \"USD\"}" } ' , but I get unamtched close bracket error ? Should I put escape character in data and id too ? – heyooo12 Jul 30 '21 at 07:54