sendAPIRequest' :: (Region -> String) -> LolRequest -> [(String, String)] -> IO (Either LolError ByteString)
sendAPIRequest' base_urlf url opts = do
    let opts_str = intercalate "&" . map (\(x, y) -> x ++ "=" ++ y) $ ("api_key", api_key) : opts
    let url_str = base_urlf EUW ++ url ++ "?" ++ opts_str
    lolInfo tag $ "GET: " ++ url_str
    resp <- curlGetResponse_ url_str [] :: IO (CurlResponse_ [(String, String)] ByteString)
    case respCurlCode resp of
        CurlOK  ->  return $ Right $ respBody resp
        _       ->  do
                        lolError tag $ "GET \"" ++ url_str ++ "\" gave response: " ++ show code
                        return $ Left code
                    where code = getErrorCode $ respStatus resp
sendAPIRequest' :: (Region -> String) -> LolRequest -> [(String, String)] -> IO (Either LolError ByteString)
sendAPIRequest' base_urlf url opts = do
    let opts_str = intercalate "&" . map (\(x, y) -> x ++ "=" ++ y) $ ("api_key", api_key) : opts
    let url_str = base_urlf EUW ++ url ++ "?" ++ opts_str
    lolInfo tag $ "GET: " ++ url_str
    resp <- curlGetResponse_ url_str [] :: IO (CurlResponse_ [(String, String)] ByteString)
    case respCurlCode resp of
        CurlOK  ->  return $ Right $ respBody resp
        _       ->  do
                        lolError tag $ "GET \"" ++ url_str ++ "\" gave response: " ++ show code
                        return $ Left code
                    where code = getErrorCode $ respStatus resp
sendAPIRequest' base_urlf url opts = do
    let opts_str = intercalate "&" . map (\(x, y) -> x ++ "=" ++ y) $ ("api_key", api_key) : opts
    let url_str = base_urlf EUW ++ url ++ "?" ++ opts_str
    lolInfo tag $ "GET: " ++ url_str
    resp <- curlGetResponse_ url_str [] :: IO (CurlResponse_ [(String, String)] ByteString)
    case respCurlCode resp of
        CurlOK  ->  return $ Right $ respBody resp
        _       ->  do
                        lolError tag $ "GET \"" ++ url_str ++ "\" gave response: " ++ show code
                        return $ Left code
                    where code = getErrorCode $ respStatus resp