Modifier

Partager via


HttpResponseMessage Data type

Version: Available or changed with runtime version 1.0.

Represents an HTTP response message including the status code and data.

Instance methods

The following methods are available on instances of the HttpResponseMessage data type.

Method name Description
Content() Gets the contents of the HTTP response.
GetCookie(Text, var Cookie) Gets the specified cookie given a name.
GetCookieNames() Gets the list of cookie names.
Headers() Gets the HTTP response's HTTP headers.
HttpStatusCode() Gets the status code of the HTTP response.
IsBlockedByEnvironment() Gets a value that indicates if the HTTP response is the result of the environment blocking an outgoing HTTP request.
IsSuccessStatusCode() Gets a value that indicates if the HTTP response was successful.
ReasonPhrase() Gets the reason phrase which typically is sent by servers together with the status code.

Remarks

The size of the HttpResponseMessage is determined by the HttpClient AL Function Response Size setting on the Dynamics 365 Business Central server. The default value is 150. For more information, see Microsoft Dynamics 365 Business Central Server Configuration.

Note

For performance reasons all HTTP, JSON, TextBuilder, and XML types are reference types, not value types. Reference types holds a pointer to the data elsewhere in memory, whereas value types store its own data.

Get Started with AL
Developing Extensions