HttpClient.UseResponseCookies(Boolean) Method
Version: Available or changed with runtime version 13.0.
If true, the client automatically attaches cookies received in the response to all subsequent requests.
Syntax
HttpClient.UseResponseCookies(UseResponseCookies: Boolean)
Parameters
HttpClient
Type: HttpClient
An instance of the HttpClient data type.
UseResponseCookies
Type: Boolean
True to automatically attach cookies received in the response to all subsequent requests. False to disable.
Remarks
The HttpClient.UseResponseCookies
method allows you to specify whether the client should automatically attach cookies received in the response to all subsequent requests. If you set the UseResponseCookies
parameter to true
, the client automatically attaches cookies received in the response to all subsequent requests. If you set the UseResponseCookies
parameter to false
, the client doesn't automatically attach cookies received in the response to all subsequent requests.
// Example of enabling and disabling cookie caching
local procedure UseResponseCookiesExample()
var
Client: HttpClient;
begin
// Enable cookie caching
Client.UseResponseCookies(true);
// Disable cookie caching
Client.UseResponseCookies(false);
end;
See Also
HttpClient Data Type
Getting Started with AL
Developing Extensions
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈