http client

Johan Blom Johan.Blom@REDACTED
Wed Oct 27 10:00:58 CEST 2004


Well,

I have basically nothing to do with the OTP version of the HTTP client, 
and I know they had to do some mangling to get it to work with the old 
inets. So I guess I should have used a disclaimer as yours as I haven't 
tried R10B at all! But at least it *used to* work in the way I describe.
Reading the documentation in the links below it seems the interface has 
changed quite a bit, thus I guess I should have kept silence.


Regards
Johan


Matthias Lang wrote:
> Johan Blom writes:
> 
>  > 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)
> 
> Hmm, there seems to be something very wrong with the documentation.
> 
> Take a look at
> 
>   http://www.erlang.se/doc/doc-5.4/lib/inets-4.0/doc/html/http.html
> 
> it doesn't mention request_sync/4 at all, and it says that request/4
> is synchronous by default.
> 
> The examples in the inets user guide 
> 
>   http://www.erlang.se/doc/doc-5.4/lib/inets-4.0/doc/html/http_client.html
> 
> also seem wrong.
> 
> Disclaimer: I still haven't installed R10B, all of my comments are
> based entirely on comparing what you say to what the documentation says.
> 
> Matthias
> 
> 




More information about the erlang-questions mailing list