# 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
```al
 HttpClient.UseResponseCookies(UseResponseCookies: Boolean)
```
## Parameters
HttpClient
Type: httpclient-data-type
An instance of the httpclient-data-type data type.
UseResponseCookies
Type: ../boolean/boolean-data-type
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.
```al
// 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;

```
## Related information
httpclient-data-type
Getting Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/httpclient/httpclient-useresponsecookies-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/httpclient/httpclient-useresponsecookies-method/
