1{-# LANGUAGE OverloadedStrings #-}
2import qualified Data.ByteString.Char8 as S8
3import Network.HTTP.Client
4import Network.HTTP.Client.MultipartFormData
5import System.Environment (getArgs, getEnv,
7import System.Exit (exitFailure)
10main = withManager defaultManagerSettings $ \m -> do
12 token <- readFile "/auth-token"
15 [x, y] -> return (x, y)
21 , " <filepath> <alias name>"
32 req1 <- parseUrl "http://www.stackage.org/upload"
34 [ partBS "alias" $ S8.pack alias
35 , partFileSource "stackage" filepath
37 req2 <- formDataBody formData req1
41 [ ("Authorization", S8.pack token)
42 , ("Accept", "application/json")
43 ] ++ requestHeaders req2
45 httpLbs req3 m >>= print
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