soap-0.2.3.6: SOAP client tools

Safe HaskellNone
LanguageHaskell98

Network.SOAP.Transport.HTTP

Contents

Synopsis

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.

type RequestP = Request -> Request Source #

Deprecated: Processors were lifted to IO.

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.

traceBody :: BodyP Source #

Deprecated: Processors were lifted to IO.

Show a debug dump of a response body.

runQuery :: Manager -> EndpointURL -> RequestP -> BodyP -> Transport Source #

Deprecated: Processors were lifted to IO.