From ab087a3e386f870d76f044936f0e6ed2d28c3664 Mon Sep 17 00:00:00 2001 From: Hiromi Ishii Date: Fri, 15 Jul 2011 21:54:52 +0900 Subject: [PATCH] FIXED: fixed applying hook twice --- Web/Authenticate/OAuth.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Authenticate/OAuth.hs b/Web/Authenticate/OAuth.hs index f7c17a0e..73a16e22 100644 --- a/Web/Authenticate/OAuth.hs +++ b/Web/Authenticate/OAuth.hs @@ -151,7 +151,7 @@ getAccessToken' :: (Request IO -> Request IO) -- ^ Request Hook -> IO Credential -- ^ Token Credential (Access Token & Secret) getAccessToken' hook oa cr = do let req = hook (fromJust $ parseUrl $ oauthAccessTokenUri oa) { method = "POST" } - rsp <- signOAuth oa cr req >>= withManager . httpLbs . hook + rsp <- withManager . httpLbs =<< signOAuth oa cr req if statusCode rsp == 200 then do let dic = parseSimpleQuery . toStrict . responseBody $ rsp