Skip to content

Instantly share code, notes, and snippets.

@chinnurtb
Created August 9, 2013 12:37
Show Gist options
  • Select an option

  • Save chinnurtb/6193290 to your computer and use it in GitHub Desktop.

Select an option

Save chinnurtb/6193290 to your computer and use it in GitHub Desktop.
Erlang Inets POST Request
$ erl
Erlang R16B01 (erts-5.10.2) [source] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V5.10.2 (abort with ^G)
1> inets:start().
ok
2> httpc: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","Fri, 09 Aug 2013 12:32:09 GMT"},
{"server","gws"},
{"allow","GET, HEAD"},
{"content-length","959"},
{"content-type","text/html; charset=UTF-8"},
{"x-xss-protection","1; mode=block"},
{"x-frame-options","SAMEORIGIN"},
{"alternate-protocol","80:quic"}],
[60,33,68,79,67,84,89,80,69,32,104,116,109,108,62,10,60,104,
116,109,108,32,108,97|...]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment