How can I post output of an API using curl and handle the response? or What's the best way to post ou

22 Replies, 1944 Views

Yo, had the same issue last week! Make sure your `-d` payload is valid JSON. I’ve been burned by extra spaces or unescaped chars.

Also, some APIs need an `Authorization` header. Maybe you’re missing that?

Pro tip: Pipe the output to `jq` to prettify the response:
```bash
curl ... | jq .
```

Messages In This Thread



Users browsing this thread: 1 Guest(s)