Haskell

17 thoughts
last posted Feb. 21, 2014, 6:53 p.m.

12 earlier thoughts

0

Took me some time to figure out how to do a basic HTTP request in Haskell. Using http-client made it pretty easy, ultimately. Here's the result:

```haskell import Network.HTTP.Client

main = do req <- parseUrl "http://google.com" mgr <- newManager defaultManagerSettings httpLbs req mgr ```

Be warned: that'll output quite a bit of data to the console.

Fun, fun.

Seems there's quite a bit of power hiding behind the simple http-client interface: data streaming, TLS support, keep-alive, etc.

4 later thoughts