Skip to content

Commit

Permalink
Simplified getCookieJar.
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrap committed Dec 29, 2017
1 parent 0036c55 commit a8e0faf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Network/Wreq/Session.hs
Expand Up @@ -128,10 +128,7 @@ withSessionControl mj settings act = do

-- | Extract current 'Network.HTTP.Client.CookieJar' from a 'Session'
getSessionCookieJar :: Session -> IO (Maybe HTTP.CookieJar)
getSessionCookieJar session =
case seshCookies session of
Nothing -> return Nothing
Just ajar -> Just <$> readIORef ajar
getSessionCookieJar = traverse readIORef . seshCookies

-- | 'Session'-specific version of 'Network.Wreq.get'.
get :: Session -> String -> IO (Response L.ByteString)
Expand Down

0 comments on commit a8e0faf

Please sign in to comment.