KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using Curl from the command line to debug a small web API I am working on. The web API expects basic authentication and a JSON object as input (POST). Currently, this basic authentication works fine: curl -i --user validuser:70e12a10-83c7-11e0-9d78-0800200c9a65 http://example.com/api.php but I also want to send a JSON object as a POST request: curl -i --user validuser:70e12a10-83c7-11e0-9d78-0800200c9a65 -X POST -d '{"person":{"name":"bob"}}' http://example.com/api.php I'm getting a 400 Bad Request response with the above command, any ideas on how I bundle a JSON object in this POST request?
Tags (comma-separated)
Save Edits
Cancel