# HttpResponseMessage.HttpStatusCode() Method
> Version: _Available or changed with runtime version 1.0._
Gets the status code of the HTTP response.
## Syntax
```al
StatusCode :=   HttpResponseMessage.HttpStatusCode()
```
> NOTE
> This method can be invoked using property access syntax.
## Parameters
HttpResponseMessage
Type: httpresponsemessage-data-type
An instance of the httpresponsemessage-data-type data type.
## Return Value
StatusCode
Type: ../integer/integer-data-type
The status code of the HTTP response.
## HTTP status codes
When you try to access content on a server by using the HTTP protocol, it returns a numeric code that indicates the result of the request and semantics of the response, including whether the request was successful.
The first digit of the status code defines the class of response. The last two digits don't have any categorization role. There are five values for the first digit:
1xx (Informational): Provisional response - the request was received, continuing process.
2xx (Successful): The server successfully received and accepted the request.
3xx (Redirection): Further action needs to be taken in order to complete the request.
4xx (Client Error): The request contains an error and can't be fulfilled.
5xx (Server Error): The server failed to fulfill the request.
See HTTP Semantics<https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes>
## Related information
httpresponsemessage-data-type
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/httpresponsemessage/httpresponsemessage-httpstatuscode-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/httpresponsemessage/httpresponsemessage-httpstatuscode-method/
