Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Creates a new client as RestClient instance.

RestClient myRest.Create(url: string)

Creates a new client as RestClient instance.

RestClient myRest.Create(url: string, service: string)

Creates a new client as RestClient instance.

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

Creates a new client as RestClient instance.

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

Arguments

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

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

var request = client.Request();

request.AddParameter('x', 1);

var response = request.Execute();