Skip to content

$Rest.Create

Overview

RestClient $Rest.Create ( url, [service], [scopes], [identity] )

Creates a new client as RestClient instance.

Arguments

String url Target url

String service Name of service to authenticate from

String scope Scope of rest operation

String | Identity identity Identity to impersonate

Remarks

  • Service, scope and identity parameters are optional. If not specified rest client is not authenticated.

Examples

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

var request = client.Request();

request.AddParameter('x', 1);

var response = request.Execute();

See Also