-- | Given a Curl object, extracts the HTTP response code.
getResponseCode :: Curl -> IO Integer
getResponseCode curl = do
    code <- getInfo curl ResponseCode
    let longValue = case code of ILong l -> l
                                 _ -> error "Curl ResponseCode is not an integer"
    return $ fromIntegral longValue

-- | Given a Curl object, extracts the URL to which we were redirected.
getResponseCode :: Curl -> IO Integer
getResponseCode curl = do
    code <- getInfo curl ResponseCode
    let longValue = case code of ILong l -> l
                                 _ -> error "Curl ResponseCode is not an integer"
    return $ fromIntegral longValue

-- | Given a Curl object, extracts the URL to which we were redirected.
getResponseCode curl = do
    code <- getInfo curl ResponseCode
    let longValue = case code of ILong l -> l
                                 _ -> error "Curl ResponseCode is not an integer"
    return $ fromIntegral longValue

-- | Given a Curl object, extracts the URL to which we were redirected.