Constructors
Instances1Eq
Eq DownloadResultDefined in cabal-install-3.16.0.0 · Distribution.Client.HttpUtils
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11
Modulecabal-install-3.16.0.0Haskell2010
Separate module for HTTP actions, using a proxy server if one exists.
Eq DownloadResultDefined in cabal-install-3.16.0.0 · Distribution.Client.HttpUtilsHttpTransportgetHttp :: Verbosity -> URI -> Maybe ETag -> FilePath -> [Header] -> IO (HttpCode, Maybe ETag)GET a URI, with an optional ETag (to do a conditional fetch), write the resource to the given file and return the HTTP status code, and optional ETag.
postHttp :: Verbosity -> URI -> String -> Maybe Auth -> IO (HttpCode, String)POST a resource to a URI, with optional Auth and return the HTTP status code and any redirect URL.
postHttpFile :: Verbosity -> URI -> FilePath -> Maybe Auth -> IO (HttpCode, String)POST a file resource to a URI using multipart/form-data encoding, with optional Auth and return the HTTP status code and any error string.
putHttpFile :: Verbosity -> URI -> FilePath -> Maybe Auth -> [Header] -> IO (HttpCode, String)PUT a file resource to a URI, with optional Auth, extra headers and return the HTTP status code and any error string.
transportSupportsHttps :: BoolWhether this transport supports https or just http.
transportManuallySelected :: BoolWhether this transport implementation was specifically chosen by the user via configuration, or whether it was automatically selected. Strictly speaking this is not a property of the transport itself but about how it was chosen. Nevertheless it's convenient to keep here.
downloadURI :: HttpTransport-> Verbosity-> URIWhat to download
-> FilePathWhere to put it
-> IO DownloadResultIf the URI scheme is HTTPS, ensure the transport supports HTTPS.
If the remote repo is accessed over HTTPS, ensure that the transport supports HTTPS.
Utility function for legacy support.