"Struggling with a post request from curl—any tips or examples?"
Hey guys,
I’m trying to send a post request from curl but keep getting errors. The syntax feels off, and I’m not sure if I’m formatting the data right.
Something like:
`curl -X POST https://example.com/api`
But then how do I add the body? Tried `-d` but it’s not working.
Also, do I need headers? Saw some examples with `-H` but not sure which ones are necessary.
Any help or a simple example would be awesome! Thanks in advance.
(PS: If you’ve got a working post request from curl, pls share!)
Hey guys,
I’m trying to send a post request from curl but keep getting errors. The syntax feels off, and I’m not sure if I’m formatting the data right.
Something like:
`curl -X POST https://example.com/api`
But then how do I add the body? Tried `-d` but it’s not working.
Also, do I need headers? Saw some examples with `-H` but not sure which ones are necessary.
Any help or a simple example would be awesome! Thanks in advance.
(PS: If you’ve got a working post request from curl, pls share!)
