[Haskell-cafe] Simple HTTP lib for Windows?

Neil Mitchell ndmitchell at gmail.com
Sat Jan 27 15:14:15 EST 2007

Hi Alistair,

> > Is there a simple way to get the contents of a webpage using Haskell on a
> > Windows box?
> This isn't exactly what you want, but it gets you partway there. Not
> sure if LineBuffering or NoBuffering is the best option. Line
> buffering should be fine for just text output, but if you request a
> binary object (like an image) then you have to read exactly the number
> of bytes specified, and no more.

This works great for haskell.org, unfortunately it doesn't work as
well with the rest of the web universe.

With www.google.com I get: Program error: <handle>: IO.hGetChar:
illegal operation

With www.slashdot.org I get: 501 Not Implemented returned

www.msnbc.msn.com works fine.

Any ideas why? Are there any alternatives to read in a file off the
internet (i.e. wget but as a library)



More information about the Haskell-Cafe mailing list