Wreq: use basic auth and also change the response timeout

Hi, I am using Wreq with basic authentication. I also want to change the response timeout. The following code compiles but the user authentication fails: import Network.HTTP.Client (defaultManagerSettings, managerResponseTimeout) opts = defaults & manager .~ Left (defaultManagerSettings { managerResponseTimeout = Just 3000000000 } ) & auth .~ basicAuth "user" "pass" Perhaps I'm not using the lens onto the manager correctly? If I use just opts = defaults & auth .~ basicAuth "user" "pass" then my program runs fine. But I need the longer timeout for some large downloads. Thanks, -- Carlo Hamalainen http://carlo-hamalainen.net

On 06/10/14 09:59, Carlo Hamalainen wrote:
opts = defaults & manager .~ Left (defaultManagerSettings { managerResponseTimeout = Just 3000000000 } ) & auth .~ basicAuth "user" "pass"
Perhaps I'm not using the lens onto the manager correctly?
Sorry for the noise, the code I wrote above does work, I was running into problems due to my own configuration of a number of different development environments :-/ -- Carlo Hamalainen http://carlo-hamalainen.net
participants (1)
-
Carlo Hamalainen