http-client-rustls-0.0.2.0: http-client TLS backend using Rustls
Safe HaskellSafe-Inferred
LanguageGHC2021

Network.HTTP.Client.Rustls

Description

Make HTTPS connections using http-client and Rustls.

>>> import qualified Network.HTTP.Client as HTTP
>>> import qualified Network.HTTP.Client.Rustls as HTTP
>>> :{
example :: IO ()
example = do
  mgr <- HTTP.newRustlsManager -- this should be shared across multiple requests
  req <- HTTP.parseUrlThrow "https://example.org"
  res <- HTTP.httpLbs req mgr
  print $ HTTP.responseBody res
:}
Synopsis

Documentation

newRustlsManager :: MonadIO m => m Manager Source #

Create a new Manager using good TLS defaults and the OS certificate store.

rustlsManagerSettings :: ClientConfig -> ManagerSettings Source #

Get TLS-enabled HTTP ManagerSettings from a Rustls ClientConfig, consumable via newManager.