property OnPutToCache: TScRestRequestEvent;

 

type

 TScRestRequestEvent = procedure(const RestRequest: TScRestRequest) of object;

 

Description

Is triggered only if caching is enabled (CacheResponse = True) and the request method is GET (Method = rmGET).

This event occurs after a successful request and allows you to store the result in a local cache. To do this, in the event handler, read the request result using one of the methods of the RestResponse object—such as ReadAsBytes, ReadAsString, or ReadToStream—and save the received value to your cache.

RestRequest represents the successfully completed request to the endpoint.

 

See also

CacheResponse

 

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