http client
Johan Blom
Johan.Blom@REDACTED
Wed Oct 27 08:56:28 CEST 2004
Hi,
you are using the asynchronous interface to the HTTP client that expects
the reply to be sent as an event in a form suitable for handle_cast/2 in
a gen_server behaviour.
To use the synchronous interface try,
http:request_sync(get, {"http://www.compulenta.ru/rss.xml", []}, []).
Btw, sorry for the late reply (only reading this list occasionally)
Regards
Johan Blom
Mobile Arts
Anastasia Gornostaeva wrote:
> Hello.
>
> 1> application:start(inets).
> ok
> 2> http:request(get, {"http://www.compulenta.ru/rss.xml", []}, [], []).
>
> =ERROR REPORT==== 22-Oct-2004::17:02:11 ===
> ** Generic server <0.44.0> terminating
> ** Last message in was {tcp,#Port<0.107>,
> <<72,84,84,80,47,49,46,49,32,50,48,48,32,79,75,13,10
> ...
> ** Reason for termination ==
> ** {{badmatch,{noreply,{state,{request,
> #Ref<0.0.0.225>,
> ...
> [{httpc_handler,handle_http_body,2},
> {gen_server,handle_msg,6},
> {proc_lib,init_p,5}]}
>
> ahd erlanng shell is locked forewer. Erlang r10b.
> A simple question: where i'm wrong?
> Or please advise me a ready-to-use packet for fetching via http/ftp.
>
> ermine
>
>
More information about the erlang-questions
mailing list