Constructors
Instances1Eq
Eq DownloadResultDefined in cabal-install-3.12.1.0 · Distribution.Client.HttpUtils
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulecabal-install-3.12.1.0Haskell2010
Separate module for HTTP actions, using a proxy server if one exists.
Eq DownloadResultDefined in cabal-install-3.12.1.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 DownloadResultUtility function for legacy support.