{"title":"HttpResponseMessage.HttpStatusCode() Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/httpresponsemessage/httpresponsemessage-httpstatuscode-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/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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/httpresponsemessage/httpresponsemessage-httpstatuscode-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":"Gets the status code of the HTTP response.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Syntax","slug":"syntax","at":103,"chars":139},{"level":2,"title":"Parameters","slug":"parameters","at":242,"chars":130},{"level":2,"title":"Return Value","slug":"return-value","at":372,"chars":100},{"level":2,"title":"HTTP status codes","slug":"http-status-codes","at":472,"chars":872},{"level":2,"title":"Related information","slug":"related-information","at":1344,"chars":147}],"text":"> Version: _Available or changed with runtime version 1.0._\nGets the status code of the HTTP response.\n## Syntax\n```al\nStatusCode :=   HttpResponseMessage.HttpStatusCode()\n```\n> NOTE\n> This method can be invoked using property access syntax.\n## Parameters\nHttpResponseMessage\nType: httpresponsemessage-data-type\nAn instance of the httpresponsemessage-data-type data type.\n## Return Value\nStatusCode\nType: ../integer/integer-data-type\nThe status code of the HTTP response.\n## HTTP status codes\nWhen 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.\nThe 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:\n1xx (Informational): Provisional response - the request was received, continuing process.\n2xx (Successful): The server successfully received and accepted the request.\n3xx (Redirection): Further action needs to be taken in order to complete the request.\n4xx (Client Error): The request contains an error and can't be fulfilled.\n5xx (Server Error): The server failed to fulfill the request.\nSee HTTP Semantics<https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes>\n## Related information\nhttpresponsemessage-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}