Skip to content

RestRequest.ExecuteStringAsync

Overview

Promise<String> RestRequest.ExecuteStringAsync ( )
Executes the request and returns the result as string

Remarks

  • Unlike RestRequest.Execute method this method verifes the server status code is returned as OK ( HTTP 200 ). If not exception is thrown.

Examples

var client = $Rest.Create('http://targetserver');

var request = client.Request();

request.AddParameter('x', 1);

request.ExecuteStringAsync().then(function(result) {
    // ...
});

See Also