Skip to content

Instantly share code, notes, and snippets.

@l1x
Created October 26, 2011 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l1x/1316743 to your computer and use it in GitHub Desktop.
Save l1x/1316743 to your computer and use it in GitHub Desktop.
erlang http post
1> inets:start().
ok
2> http:request(post, {"http://www.google.com/",[],"application/x-www-form-urlencoded", "hl=en&q=erlang&btnG=Google+Search&meta="},[], []).
{ok,{{"HTTP/1.1",405,"Method Not Allowed"},
[{"date","Wed, 26 Oct 2011 15:40:10 GMT"},
{"server","gws"},
{"allow","GET, HEAD"},
{"content-length","11816"},
{"content-type","text/html; charset=UTF-8"},
{"x-xss-protection","1; mode=block"},
{"x-frame-options","SAMEORIGIN"}],
[60,33,68,79,67,84,89,80,69,32,104,116,109,108,62,10,60,104,
116,109,108,32,108,97|...]}}
@sharp
Copy link

sharp commented Jul 24, 2012

httpc works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment