[Fwd: http client hell]

Joe Armstrong joe@REDACTED
Sat Dec 11 15:09:40 CET 2004



On Fri, 10 Dec 2004, blaguehubert wrote:

> Everything is ok, I did not feel it was a "shitty attitude"...
>
> I'm a little bored, not by Ingela Anderton, but by the fact that I did not 
> have time to wait for the next release and this mean that I will have to 
> write my own http client (arg!!!).

Well hopefully not :-) - I think we (ie the people on the list might be 
able to help)

Just to clarify - what do you want? - the expression "http client" could 
mean many different things:

The simplest is:

 	get_url("http://www...") which just gets a web page

This is useful for simple applications but soon breaks down for more 
complex stuff.

A better approach is to open an HTTP stream and then send and receive 
requests on the stream. Basically:

 	{ok, Stream} = http:open("http://www....")
 	... requests ...
 	http:close(Stream)

What to do in requests is more problematic. Do you want to to synchronous 
requests, or asynchronous. Do you want to create keep-alive sessions and 
handle chucked data streams or streaming media etc.

Do you want your client to preform redirects etc?

If you could just say in a sentence or so what kind of client you want I'm 
sure somebody here might be able to help, if it's just the simpler
form (get_url) I'll post my latest version (which is in daily use)
some of the versions referenced in previous posts are probably not 
up-to-date.

Cheers

/Joe




More information about the erlang-questions mailing list