Skip to content

ExecuteStringAsync

Executes the request asynchronously and returns the response body as a string.

1
myRestRequest.ExecuteStringAsync():Promise<string>

Returns

A Promise that resolves to the response body as a string.

Remarks

The response status is verified like RestRequest.ExecuteString.

Examples

Read a text response asynchronously

1
2
3
4
5
6
$Rest.Create('https://reports.example.com/')
    .Request('daily.csv')
    .ExecuteStringAsync()
    .then(function (csv) {
        $Xml.SetValue('Report', csv);
    });

See Also