# HttpHeaders data type
> Version: _Available or changed with runtime version 1.0._
Is a collection of headers and their values.
## Instance methods
The following methods are available on instances of the HttpHeaders data type.
Method name|Description
Add(Text, Text)<httpheaders-add-string-string-method>|Adds the specified header and its value into the HttpHeaders collection. Validates the provided value.
Add(Text, SecretText)<httpheaders-add-string-secrettext-method>|Adds the specified secret header and its value into the HttpHeaders collection. Validates the provided value.
httpheaders-clear-method|Sets the HttpHeaders variable to the default value.
Contains(Text)<httpheaders-contains-method>|Checks if the specified header exists in the HttpHeaders collection.
ContainsSecret(Text)<httpheaders-containssecret-method>|Returns if the header for the given key has a secret value.
GetSecretValues(Text, Array of [SecretText])<httpheaders-getsecretvalues-string-secrettext-method>|Gets the secret values for the specified key.
GetSecretValues(Text, List of [SecretText])<httpheaders-getsecretvalues-string-list[secrettext]-method>|Gets the secret values for the specified key.
GetValues(Text, Array of [Text])<httpheaders-getvalues-string-text-method>|Gets the values for the specified key.
httpheaders-getvalues-string-list[text]-method|Gets the values for the specified key.
httpheaders-keys-method|Gets the key name of all the headers
Remove(Text)<httpheaders-remove-method>|Removes the specified header from the HttpHeaders collection.
TryAddWithoutValidation(Text, Text)<httpheaders-tryaddwithoutvalidation-string-string-method>|Adds the specified header and its value into the HttpHeaders collection. Doesn't validate the provided value.
TryAddWithoutValidation(Text, SecretText)<httpheaders-tryaddwithoutvalidation-string-secrettext-method>|Adds the specified secret header and its value into the HttpHeaders collection. Doesn't validate the provided value.
## Related information
Get 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/httpheaders/httpheaders-data-type, 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/httpheaders/httpheaders-data-type/
