Safe Haskell | None |
---|---|
Language | Haskell98 |
- initTransportWithM :: ManagerSettings -> EndpointURL -> RequestProc -> BodyProc -> IO Transport
- type EndpointURL = String
- type RequestProc = Request -> IO Request
- printRequest :: RequestProc
- type BodyProc = ByteString -> IO ByteString
- printBody :: BodyProc
- runQueryM :: Manager -> EndpointURL -> RequestProc -> BodyProc -> Transport
- initTransport :: EndpointURL -> RequestP -> BodyP -> IO Transport
- initTransport_ :: EndpointURL -> IO Transport
- initTransportWith :: ManagerSettings -> EndpointURL -> RequestP -> BodyP -> IO Transport
- confTransport :: Text -> Config -> IO Transport
- confTransportWith :: ManagerSettings -> Text -> Config -> RequestP -> BodyP -> IO Transport
- type RequestP = Request -> Request
- traceRequest :: RequestP
- type BodyP = ByteString -> ByteString
- iconv :: EncodingName -> BodyP
- traceBody :: BodyP
- runQuery :: Manager -> EndpointURL -> RequestP -> BodyP -> Transport
Initialization
initTransportWithM :: ManagerSettings -> EndpointURL -> RequestProc -> BodyProc -> IO Transport Source #
Create a http-client transport using manager settings (for plugging tls etc.).
type EndpointURL = String Source #
Web service URL. Configured at initialization, but you can tweak it dynamically with a request processor.
Making a request
type RequestProc = Request -> IO Request Source #
Update request record after defaults and method-specific fields are set.
Processing a response
type BodyProc = ByteString -> IO ByteString Source #
Process response body to make it a nice UTF8-encoded XML document.
Raw transport function
runQueryM :: Manager -> EndpointURL -> RequestProc -> BodyProc -> Transport Source #
Render document, submit it as a POST request and retrieve a body.
Deprecated
initTransport :: EndpointURL -> RequestP -> BodyP -> IO Transport Source #
Create a http-client transport. Use identity transformers if you don't need any special treatment.
initTransport_ :: EndpointURL -> IO Transport Source #
Create a transport without any request and body processing.
initTransportWith :: ManagerSettings -> EndpointURL -> RequestP -> BodyP -> IO Transport Source #
Deprecated: Processors were lifted to IO.
confTransport :: Text -> Config -> IO Transport Source #
Load common transport parameters from a configurator file.
soap { url = "https://vendor.tld/service/" trace = true timeout = 15 }
Only url field is required.
import Data.Configurator (load, Worth(Required)) main = do transport <- confTransport "soap" =<< load [Required "etc/example.conf"]
confTransportWith :: ManagerSettings -> Text -> Config -> RequestP -> BodyP -> IO Transport Source #
A more extensible transport parameter loader.
traceRequest :: RequestP Source #
Deprecated: Processors were lifted to IO.
Show a debug dump of a request body.
type BodyP = ByteString -> ByteString Source #
Deprecated: Processors were lifted to IO.
iconv :: EncodingName -> BodyP Source #
Create an IConv-based processor.
Deprecated: Processors were lifted to IO.
Show a debug dump of a response body.