Making HTTP requests in Erlang

Stuart Loxton stuart.loxton@REDACTED
Sun Jun 7 23:32:31 CEST 2009


Hi,

I'm having a few problems making HTTP requests in Erlang and however  
much I try I can't work out what's wrong. Places I've looked and  
things I've tried.

1. erlang docs on http module
2. Googling everything
3. Using google codesearch.

I've tried even the simplest of functions: http:request("http://google.com/ 
") and it comes up with a large error:

** exception exit: {noproc,
                        {gen_server,call,
                            [httpc_manager,
                             {request,
                                 {request,undefined,<0.149.0>,0,http,
                                     {"stuartloxton.com",80},
                                     "/",[],get,
                                     {http_request_h,undefined,"keep- 
alive",undefined,undefined,
                                          
undefined,undefined,undefined,undefined,undefined,...},
                                     {[],[]},
                                     {http_options,"HTTP/ 
1.1",infinity,true,[],undefined,false},
                                     "http://stuartloxton.com/", 
[],none,[]}},
                             infinity]}}
      in function  gen_server:call/3
      in call from http:handle_request/6

Anyone know what really simple mistake I've made?

Thanks in advance!


More information about the erlang-questions mailing list