Skip to content

Create

Creates a new client as RestClient instance.

1
myRest.Create(url: string, service: string, scope: string, identity: string):RestClient

Parameters

string url
    Target url

string service
    Name of service to authenticate from

string scope
    Scope of rest operation

string identity
    Identity to impersonate

Remarks

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

Example

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

var request = client.Request();

request.AddParameter('x', 1);

var response = request.Execute();

See Also