How do I properly use curl --post to send data in a request? or What's the correct syntax for curl --

19 Replies, 2344 Views

Hey folks!

So I'm trying to figure out how to properly use curl --post to send some data, but I’m kinda stuck. Like, what’s the right syntax for form data?

I tried something like:
`curl --post "name=foo&age=25" https://example.com`
But it’s not working?? Am I missing something obvious?

Also, what’s the diff between curl --post and just -X POST? Seen both around and got confused.

Oh, and if anyone’s got tips for sending JSON with curl --post, that’d be awesome too. My attempts keep getting rejected lol.

Thanks in advance! 🙏

Messages In This Thread
How do I properly use curl --post to send data in a request? or What's the correct syntax for curl -- - by - 19-01-2025, 01:29 PM



Users browsing this thread: 1 Guest(s)