/Flurl.Http.Soap

Very basic extension for Flurl.Http to support the SOAP protocol

Primary LanguageC#MIT LicenseMIT

Icon

Flurl.Http.Soap

Very basic extension for Flurl to support the SOAP protocol.

Important

This is very much a half-baked, early implementation. It currently only implements a ReceiveSoap method, with a simple SoapEnvelope wrapper class.

Usage

string soapXmlString = 
    @"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">
        <soap:Body>
            <RequestBody>
                <ApiField>Test</ApiField>
            </RequestBody>
        </soap:Body>
    </soap:Envelope>";

ResponseBody responseBodyContent = await "https://api.url/endpoint"
    .PostXmlAsync(soapXmlString)
    .ReceiveSoap<ResponseBody>();

Thanks