Skip to content

ExecuteXml

Executes the request and returns the response body as an XML node.

myRestRequest.ExecuteXml(contextNode?: Xml):Xml (Xml)

Parameters

Xml contextNode optional
    Optional XML node whose namespace and schema context is used while parsing the response.

Returns

The response body as an Xml node.

Remarks

Unlike the RestRequest.Execute method, this method verifies that the server's status code is OK (HTTP 200). If not, an exception is thrown.

Example

1
2
3
4
5
6
7
var client = $Rest.Create('http://targetserver');

var request = client.Request();

request.AddParameter('x', 1);

var result = request.ExecuteXml();

See Also