If you would like to upgrade to a newer long-term support version of Studio Pro, see Moving from Mendix Studio Pro 8 to 9.
HttpRequest and HttpResponse System Entities
Introduction
HttpRequest
is a system entity that represents a request to a server. HttpResponse
represents the response from the server. Use these entities when publishing or consuming REST services.
HttpRequest
The HttpRequest
entity has the following attributes:
Attribute | Type | Default Value | Description |
---|---|---|---|
HttpVersion (Inherited from HttpMessage ) |
String | HTTP/1.1 | The protocol version. You can almost always ignore this value. |
Uri |
String | empty | The full URI for the incoming request, including query parameters. |
Content (inherited from HttpMessage ) |
String | empty | The body of the request. |
You can retrieve the request headers via the HttpHeaders
association.
HttpResponse
The HttpResponse
entity has the following attributes:
Attribute | Type | Default Value | Description |
---|---|---|---|
HttpVersion (inherited from HttpMessage ) |
String | HTTP/1.1 | The protocol version. You can almost always ignore this value. |
StatusCode |
Integer | 200 | The HTTP status code returned by the server. |
ReasonPhrase |
String | OK | A textual representation of the StatusCode . |
Content |
String | empty | The body of the response. |
For more information on HTTP status codes, see the W3C Specification of Status Code Definitions.
You can retrieve or create response headers via the HttpHeaders
association.
An important HttpResponse
header is Content-Type
, which indicates how the content should be interpreted. For more information on this header, see the W3C specification of Content-Type.