# HttpClientHandler attribute
> Version: _Available or changed with runtime version 15.0._
Specifies that the method is an HttpClientHandler method, which catches and handles HTTP requests in test executions.
> NOTE
> This attribute is supported only in Business Central on-premises.
## Applies to
 Method
> NOTE
> The HttpClientHandler attribute can only be set inside codeunits with the SubType property set to Test.
## Syntax
> Version: _Available or changed with runtime version 15.0._
```al
[HttpClientHandler]
procedure HttpClientHandler(Request: TestHttpRequestMessage; var Response: TestHttpResponseMessage) IssueOriginalRequest: Boolean;
```
> IMPORTANT
> The above signature requires the HttpClientHandler method to be global. See https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-al-methods.md%23local-and-global-scope.
### Arguments
Request
Type: ../methods-auto/testhttprequestmessage/testhttprequestmessage-data-type
The HTTP request that need to be handled.
Response
Type: ../methods-auto/testhttpresponsemessage/testhttpresponsemessage-data-type
The mocked response that need to be populated by the handler.
### Return Values
IssueOriginalRequest
Type: ../methods-auto/boolean/boolean-data-type
Indicates whether to issue the original HTTP request (true) or use the mocked response (false). The default return value of the HttpClientHandler procedure is false, ensuring that external service calls are only made intentionally.
## Related information
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/attributes/devenv-httpclienthandler-attribute, 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/attributes/devenv-httpclienthandler-attribute/
