1{-# LANGUAGE StandaloneDeriving #-}
2{-# OPTIONS_GHC -fno-warn-orphans #-}
19sendGET :: String -> IO (Response String)
20sendGET url = sendGETwH url []
22sendGETwH :: String -> [Header] -> IO (Response String)
23sendGETwH url hdr = unResult $ simpleHTTP $ (getRequest url) { rqHeaders = hdr }
25sendHEAD :: String -> IO (Response String)
26sendHEAD url = sendHEADwH url []
28sendHEADwH :: String -> [Header] -> IO (Response String)
29sendHEADwH url hdr = unResult $ simpleHTTP $ (headRequest url) { rqHeaders = hdr }
31unResult :: IO (Result (Response String)) -> IO (Response String)
35 Right rsp -> return rsp
36 Left _ -> error "Connection error"
38getHeaderValue :: HasHeaders a => HeaderName -> a -> Maybe String
39getHeaderValue key r = case retrieveHeaders key r of
41 x:_ -> Just $ hdrValue x
43deriving instance Eq Header
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list