{"title":"HttpClient.UseResponseCookies(Boolean) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/httpclient/httpclient-useresponsecookies-method/","by":"JOP-AL","license":"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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/httpclient/httpclient-useresponsecookies-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"If true, the client automatically attaches cookies received in the response to all subsequent requests.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"HttpClient.UseResponseCookies(Boolean) Method","slug":"httpclientuseresponsecookiesboolean-method","at":0,"chars":1467},{"level":2,"title":"Syntax","slug":"syntax","at":213,"chars":80},{"level":2,"title":"Parameters","slug":"parameters","at":293,"chars":265},{"level":2,"title":"Remarks","slug":"remarks","at":558,"chars":767},{"level":2,"title":"Related information","slug":"related-information","at":1325,"chars":142}],"text":"# HttpClient.UseResponseCookies(Boolean) Method\n> Version: _Available or changed with runtime version 13.0._\nIf true, the client automatically attaches cookies received in the response to all subsequent requests.\n## Syntax\n```al\n HttpClient.UseResponseCookies(UseResponseCookies: Boolean)\n```\n## Parameters\nHttpClient\nType: httpclient-data-type\nAn instance of the httpclient-data-type data type.\nUseResponseCookies\nType: ../boolean/boolean-data-type\nTrue to automatically attach cookies received in the response to all subsequent requests. False to disable.\n## Remarks\nThe 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.\n```al\n// Example of enabling and disabling cookie caching\n\nlocal procedure UseResponseCookiesExample()\nvar\n    Client: HttpClient;\nbegin\n    // Enable cookie caching\n    Client.UseResponseCookies(true);\n\n    // Disable cookie caching\n    Client.UseResponseCookies(false);\nend;\n\n```\n## Related information\nhttpclient-data-type\nGetting Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}