Allows to call rest services with JSON or XML content types.
Rest Service Calling Walkthrough
Creating Rest Client
To create a client use $Rest.Create method by providing the rest service base url.
Some of rest services may require the authentication. Emakin supports the OpenAuth2 based authentication services and to create a authenticated client please specify the service and identity as below;
Creating Rest Request
After creating client connection you can create rest request and populate parameters as below;
Every request created with resource url address to added to client base url. Request url may contain parameters to build a dynamic url address like 'sitePath' parameter below;
You may also set http headers with AddHeader method.
Fetching Rest Response
After Request populated you can call the Execute method to execute and fetch Response object. Execute method by default does not perform any error check. If you want to be sure request has successfully executed please use Expect method to specify expected status code.