Skip to content

AddXml

Sets the request body to XML content.

1
myRestRequest.AddXml(xml: ( string | Xml )):RestRequest

Parameters

( string | Xml ) xml
    The XML content to send.

Returns

The current RestRequest instance.

Remarks

The XML is serialized as the request body, the request format is set to XML, and the request method is set to POST.

Examples

Send a node of the form data

1
2
3
4
var result = $Rest.Create('https://api.example.com/')
    .Request('orders/import')
    .AddXml($Xml.SelectSingle('Order'))
    .ExecuteXml();

See Also