Recent searches


No recent searches

API error: curl: (3) URL using bad/illegal format or missing URL



image avatar

Dwight Bussman

Zendesk Customer Care

Edited Dec 13, 2022


0

3

3 comments

Perfect. Fixed by adding double quotes around my URL. Original form was :

curl -X POST localhost:8080/employees -H 'Content-type:application/json' -d '{"name": "Samwise Gamgee", "role": "gardener"}'

Fixed form : 

curl -X POST localhost:8080/employees -H "Content-type:application/json" -d "{\"name\": \"Samwise Gamgee\", \"role\": \"gardener\"}"

Many thanks. 

Vito

 

1


Glad that was helpful, Vito!

0


Thanks everyone, fix my error when building my first application also

0


Please sign in to leave a comment.