Unit

ScRestClient

 

Description

TScRestClient is a component designed to facilitate data exchange with a REST service based on a provided API. It represents the entire REST service within your application. Individual requests to specific service resources (endpoints) are handled by TScRestRequest components, which are linked to TScRestClient and use it as a container for common properties and events.

A key property of TScRestClient is Authenticator, which references an object responsible for automatically handling authentication for each request. The ScRestAuthenticator unit includes several classes that implement standard authentication methods and allow developers to create and use their own descendants.

The component itself doesn't use most properties of TScRestClient. Except for Authenticator and BaseURL, properties are used as templates for initializing new TScRestRequest parameters—such as headers, SSL options, and request time-out—that are common for all REST requests to the specific API. This reduces the time required to develop the REST client portion of your application.

To better understand how to work with the TScRestClient, TScRestRequest, TScRestResponse, and TScRestAuthenticator classes, see the example in the Demos\RestClient folder for a practical demonstration.

SecureBridge Components, Copyright © 2007-2025 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support