Home > Others > Using curl to send JSON data to an API.

Using curl to send JSON data to an API.

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

Advertisements
Categories: Others Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: