property OnPutToCache: TScRestRequestEvent;

 

type

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

 

Description

Is triggered only when the request has the following properties: CacheResponse = True and Method = rmGET.

This event occurs after a successful request and allows you to save the request result to a local cache. To do so, 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.

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