Not bad! Your curl post example for JSON is correct. For form data, it’s a bit trickier.
If it’s simple key-value pairs (no files), use `-d` with the URL-encoded header:
```bash
curl -X POST https://example.com/api -d "param1=value1" -H "Content-Type: application/x-www-form-urlencoded"
```
For files or multipart, `-F` is your friend:
```bash
curl -X POST https://example.com/upload -F "name=test" -F "doc=@document.pdf"
```
Try https://reqbin.com/ to test these online.
If it’s simple key-value pairs (no files), use `-d` with the URL-encoded header:
```bash
curl -X POST https://example.com/api -d "param1=value1" -H "Content-Type: application/x-www-form-urlencoded"
```
For files or multipart, `-F` is your friend:
```bash
curl -X POST https://example.com/upload -F "name=test" -F "doc=@document.pdf"
```
Try https://reqbin.com/ to test these online.
