Skip to content

ExecuteAsync

Executes the request asynchronously and returns the target server response.

1
myRestRequest.ExecuteAsync():Promise<RestResponse>

Returns

A Promise that resolves to a RestResponse instance containing the server's response.

Remarks

This method does not verify the response status.

Example

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

request.AddParameter('x', 1);

request.ExecuteAsync().then(function(response) {
    // ..
});

See Also