From http://stackoverflow.com/questions/14978411/http-post-and-get-using-curl-in-linux