How can I view the post output of an API using curl API? or What’s the best way to check the post out

18 Replies, 690 Views

Subject: How can I view the post output of an api using curl api?

Hey folks,

I’m trying to check the post output of an api using curl api, but I’m not seeing anything. Am I missing something?

I’m running something like:
`curl -X POST https://example.com/api -d '{"key":"value"}'`

But the response is blank or just errors.

Is there a trick to properly capture the post output of an api using curl api? Maybe headers or flags I’m forgetting?

Also, if the api expects JSON, do I need to add `-H "Content-Type: application/json"`?

Thanks in advance!

(PS: sorry for typos, typing on mobile lol)

Messages In This Thread
How can I view the post output of an API using curl API? or What’s the best way to check the post out - by - 07-10-2024, 07:03 AM



Users browsing this thread: 1 Guest(s)