Archive

Archive for March, 2015

Using curl to send JSON data to an API.

March 31, 2015 Leave a comment

Using curl to send JSON data to an API.

Below is a very simple command to send JSON data to your API.
curl -H "Content-Type: application/json" -d '{"firstname":"ahmed","lastname":"zzzz"}' http://localhost:3000/login
Above command will send a JSON as below to link http://localhost:3000/login
{
"firstname":"ahmed",
"lastname":"zzzz"
}

from Blogger http://ift.tt/1xRJq9M
via IFTTT

Categories: Others Tags: ,