Safe Haskell | Safe-Inferred |
---|---|
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 Source #
Constructors
FileAlreadyInCache | |
FileDownloaded FilePath |
Instances
Eq DownloadResult Source # | |
Defined in Distribution.Client.HttpUtils Methods (==) :: DownloadResult -> DownloadResult -> Bool # (/=) :: DownloadResult -> DownloadResult -> Bool # |
configureTransport :: Verbosity -> [FilePath] -> Maybe String -> IO HttpTransport Source #
data HttpTransport Source #
Constructors
HttpTransport | |
Fields
|
Arguments
:: HttpTransport | |
-> Verbosity | |
-> URI | What to download |
-> FilePath | Where to put it |
-> IO DownloadResult |
transportCheckHttps :: Verbosity -> HttpTransport -> URI -> IO () Source #
If the URI scheme is HTTPS, ensure the transport supports HTTPS.
remoteRepoCheckHttps :: Verbosity -> HttpTransport -> RemoteRepo -> IO () Source #
If the remote repo is accessed over HTTPS, ensure that the transport supports HTTPS.
isOldHackageURI :: URI -> Bool Source #
Utility function for legacy support.