Skip to content

Sending JSON in post with curl

   

How to post json from Mac terminal with curl command.
I often use it when I'm developing locally and want to check the APIs.

curl http://localhost:3000/api/url -X POST -H "Content-Type: application/json" -d '{"email":"kabigon@swiswiswift.com", "password":"password"}'

  1. Disable root login