Subject: Need help with curl make request syntax!
Hey everyone,
I'm trying to use curl make request to test an API, but I'm kinda stuck on the syntax.
Like, how do I add headers and parameters properly? I tried something like:
`curl -X GET https://example.com/api -H "Content-Type: application/json"`
But it’s not working, and I’m not sure why. Am I missing something obvious?
Also, what’s the best way to include POST data? I keep getting errors when I try.
Any tips or common mistakes to avoid? Thanks in advance!
—A confused dev
Hey everyone,
I'm trying to use curl make request to test an API, but I'm kinda stuck on the syntax.
Like, how do I add headers and parameters properly? I tried something like:
`curl -X GET https://example.com/api -H "Content-Type: application/json"`
But it’s not working, and I’m not sure why. Am I missing something obvious?
Also, what’s the best way to include POST data? I keep getting errors when I try.
Any tips or common mistakes to avoid? Thanks in advance!
—A confused dev
