From http://stackoverflow.com/questions/5658510/curl-json-post-request-via-terminal-to-a-rails-app