Saturday, 23 April 2016

How to send a HTTP request using curl ?


PUT request
curl -XPUT "URL" -d'DATA'

Example
curl -XPUT "http://10.192.224.118:9200/movies/movie/1" -d'{"title": "The Godfather","director": "Francis Ford Coppola","year": 1972,"genres": ["Crime", "Drama"]}'



GET request
 curl -XGET "URL" -d''



No comments:

Post a Comment

Note: only a member of this blog may post a comment.