How to Use Curl POST to Give Input from a File? Need Help!

18 Replies, 1407 Views

Hey, noob questions are how we learn! For Curl POST give input from file, you’re almost there. Just add the `Content-Type` header:

```
curl -X POST -H "Content-Type: application/json" -d @data.json http://example.com/api
```

Also, if you’re testing a lot, [Paw](https://paw.cloud/) is a great tool for macOS users.

Messages In This Thread



Users browsing this thread: 1 Guest(s)