In my Haskell program I need to talk to a server that requires NTLM authentication. I know this because the server answers
401 ... WWW-Authenticate: NTLM
to my request. When I access the website in Chrome and trace the HTTP conversation it's obvious that a challenge-response authentication of some sort is taking place.
Is there a way to perform this kind of authentication in Haskell? Previously I've been using the req library to do HTTP requests but it doesn't seem to support NTLM authentication. I also understand that NTLM requires re-using a single TCP connection for all traffic once the connection has been authenticated. I don't see any obvious way of making that happen in req from my reading of the docs.
I haven't tried this and don't know NTLM, but it looks like the libcurl bindings have what you need.
Maybe you could use them to construct something like this with it. You could try:
curlGet "http://url.com" [CurlHttpAuth [HttpAuthNTLM], CurlUserPassword "username:password"]