How do I properly send a POST request in curl? or What's the correct way to make a POST request in cu

16 Replies, 1615 Views

Hey! Here’s a simple breakdown for a post request in curl:

- For JSON: Use `-d` with `-H "Content-Type: application/json"`.
- For forms: Use `-F` or `-d "key=value"`.

Example:
```curl -X POST https://example.com/login -d "user=admin&pass=123"```

If it’s still failing, the server might need more headers.

Messages In This Thread



Users browsing this thread: 1 Guest(s)