Skip to content

Instantly share code, notes, and snippets.

@l1x
Created October 26, 2011 15:54
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/1316791 to your computer and use it in GitHub Desktop.
Save l1x/1316791 to your computer and use it in GitHub Desktop.
async http request
2> {ok, RequestId} = httpc:request(get, {"http://www.erlang.org", []}, [], [{sync, false}]).
{ok,#Ref<0.0.0.38>}
3> receive {http, {RequestId, Result}} -> ok after 500 -> error end.
ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment