Using inets http client
Will Newton
will@REDACTED
Tue Jun 7 14:17:51 CEST 2005
On Tuesday 07 June 2005 11:31, Ingela Anderton wrote:
> Sorry for not being quite as quick to answer as Michael but yesterday
> was a new Swedish national holiday, so I have not read my mail
> since Friday.
Thanks, I'm glad you could shed some light on the issue. My code is working
now based on your explanation.
> By the way are you aware that you can let the http-client handle
> the timeout part and if the timeout occurs your process
> will receive the message {http, RequestId, {error, timeout}}!
>
> Call to the client would look like this:
> http:request(get, {Url, []}, [{timeout, 10000}], [{sync, false}])
Yes, I am not sure whether I'm doing things in the correct manner. I'm quite
new to Erlang and not really familiar with the patterns of how to manage
concurrency. I'm writing a command line tool, so I wanted to make it appear
as interactive as possible and give feedback during the timeout (printing the
dots). There may be a better way to do this - another process could print the
dots and be signalled by the http request handler to finish for example.
More information about the erlang-questions
mailing list