Hi

> My standard solution was to invoke wget, but a Haskell solution would
> be nicer. For my purpose following redirects etc. isn't required, so
> thanks very much for your help. I will be releasing this function as
> part of a library shortly, so will be giving you credit for your help!

Good god, no! The code was merely meant to illustrate how a really basic
HTTP GET might work. It certainly doesn't deal with a lot of the
additional cases, like redirects and resource moves, and
non-standards-compliant HTTP servers. I'm no HTTP expert, so for all I
know this example code is likely non-standards-compliant too. It really
only works for a very straightforward text file GET, and there's no
exception or error handling, or any of the more interesting cases.

But at the same time its the best solution available without going to
much pain and C libraries. I would love something more robust and
equally simple, but haven't found it.

The library I am writing is one to parse and extract information from
HTML documents, the fact that I can now download web pages merely
makes the examples I give more interesting - its not the fundamental
essence of the library.

Thanks

Neil
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to