Nice curl post example for JSON! For form data, here’s the deal:
- Use `-F` for multipart (files, etc.):
```bash
curl -X POST https://example.com/upload -F "username=test" -F "avatar=@image.jpg"
```
- Use `-d` for URL-encoded:
```bash
curl -X POST https://example.com/login -d "user=me&pass=123" -H "Content-Type: application/x-www-form-urlencoded"
```
If you’re stuck, `curl --verbose` shows the raw request.
- Use `-F` for multipart (files, etc.):
```bash
curl -X POST https://example.com/upload -F "username=test" -F "avatar=@image.jpg"
```
- Use `-d` for URL-encoded:
```bash
curl -X POST https://example.com/login -d "user=me&pass=123" -H "Content-Type: application/x-www-form-urlencoded"
```
If you’re stuck, `curl --verbose` shows the raw request.
