[b]"Need a simple curl post example – how do I send data with curl?"[/b] or [b]"Can someone share a basic curl pos

16 Replies, 886 Views

"Need a simple curl post example – how do I send data with curl?"

Hey folks,

I'm kinda stuck here. Trying to send some data via curl, but every time I mess up the syntax.

Can someone share a basic curl post example? Like, just a simple one with JSON data?

I tried `curl -X POST https://example.com/api` but it’s not working, and I’m not sure where to put the JSON payload.

A quick working snippet would save me hours of googling lol.

Thanks in advance!

---

*or*

"Struggling with curl post example – any quick working snippet?"

Yo,

Total noob here. Need a curl post example to hit an API endpoint.

Something like sending `{"name": "test"}` to a URL.

I keep getting 400 errors... am I missing headers?

Pls help a fellow dev out with a quick example!

Cheers.

Messages In This Thread
[b]"Need a simple curl post example – how do I send data with curl?"[/b] or [b]"Can someone share a basic curl pos - by - 20-11-2024, 02:13 AM



Users browsing this thread: 1 Guest(s)