[Haskell-cafe] Simple HTTP lib for Windows?

Neil Mitchell ndmitchell at gmail.com
Sun Jan 28 08:34:33 EST 2007


Hi Daniel,


> Adding in
>  hPutStrLn h ("Connection: close\r\n")
> or
>   hPutStrLn h ("Connection: keep-alive\r\n")
> as appropriate should sort that.

Works like a charm.

> This is responding with a 302, the resource has been found but is temporarily
> at another location indicated in the responses Location header.
> So, now you'll have to start parsing responses.
> In this case the Location header is www.cs.york.ac.uk/public.php

I didn't get as far as getting the 302, but it works now.

> The cheap and cheerful solution might be to invoke cURL.

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!

Thanks

Neil


More information about the Haskell-Cafe mailing list