| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Client.HttpUtils
Description
Separate module for HTTP actions, using a proxy server if one exists.
Synopsis
- data DownloadResult
- configureTransport :: Verbosity -> [FilePath] -> Maybe String -> IO HttpTransport
- data HttpTransport = HttpTransport {
- getHttp :: Verbosity -> URI -> Maybe ETag -> FilePath -> [Header] -> IO (HttpCode, Maybe ETag)
- postHttp :: Verbosity -> URI -> String -> Maybe Auth -> IO (HttpCode, String)
- postHttpFile :: Verbosity -> URI -> FilePath -> Maybe Auth -> IO (HttpCode, String)
- putHttpFile :: Verbosity -> URI -> FilePath -> Maybe Auth -> [Header] -> IO (HttpCode, String)
- transportSupportsHttps :: Bool
- transportManuallySelected :: Bool
- type HttpCode = Int
- downloadURI :: HttpTransport -> Verbosity -> URI -> FilePath -> IO DownloadResult
- transportCheckHttps :: Verbosity -> HttpTransport -> URI -> IO ()
- remoteRepoCheckHttps :: Verbosity -> HttpTransport -> RemoteRepo -> IO ()
- remoteRepoTryUpgradeToHttps :: Verbosity -> HttpTransport -> RemoteRepo -> IO RemoteRepo
- isOldHackageURI :: URI -> Bool
Documentation
data DownloadResult #
Constructors
| FileAlreadyInCache | |
| FileDownloaded FilePath |
Instances
| Eq DownloadResult # | |
Defined in Distribution.Client.HttpUtils Methods (==) :: DownloadResult -> DownloadResult -> Bool # (/=) :: DownloadResult -> DownloadResult -> Bool # | |
configureTransport :: Verbosity -> [FilePath] -> Maybe String -> IO HttpTransport #
data HttpTransport #
Constructors
| HttpTransport | |
Fields
| |
Arguments
| :: HttpTransport | |
| -> Verbosity | |
| -> URI | What to download |
| -> FilePath | Where to put it |
| -> IO DownloadResult |
transportCheckHttps :: Verbosity -> HttpTransport -> URI -> IO () #
remoteRepoCheckHttps :: Verbosity -> HttpTransport -> RemoteRepo -> IO () #
remoteRepoTryUpgradeToHttps :: Verbosity -> HttpTransport -> RemoteRepo -> IO RemoteRepo #
isOldHackageURI :: URI -> Bool #
Utility function for legacy support.