TXDataBaseRequestHandler Class
Processes a single XData HTTP request, holding its context and the settings that apply to it.
Remarks
The server module creates one instance for every request it receives, and destroys it when the request is finished. It is the object received in the TXDataModuleArgs.Handler property of the server-side event arguments, where it gives access to the HTTP request and response being processed. The settings properties return the value defined in the module the handler belongs to, unless the client overrode it for this request using the corresponding xdata- HTTP header.
Syntax
Unit: XData.Module.Base
TXDataBaseRequestHandler = class(TObject);
Constructors
| Name | Description |
|---|---|
| Create | Creates a handler to process one request received by a module. |
Methods
| Name | Description |
|---|---|
| AcceptContains | Checks whether a media type is listed in the Accept header of the request. |
| SendErrorResponse | Sends an error response to the client in the format of the current payload. |
| SetStatusCode | Sets the HTTP status code of the response. |
Properties
| Name | Description |
|---|---|
| AcceptAny | Indicates whether the client accepts any media type in the response. |
| Context | Gets the Sparkle context of the request, holding both the request and the response. |
| EntityLoopHandling | Gets how circular references between entities are handled while writing the response of this request. |
| ExpandLevel | Gets the expand level that applies to this request. |
| FlushMode | Gets how much of the object manager state this request flushes to the database. |
| InstanceLoopHandling | Gets how circular references between plain objects are handled while writing the response of this request. |
| PayloadFormat | Gets the format used to read and write the payload of this request. |
| PostMode | Gets how this request applies a POST to the database. |
| ProxyListLoadDepth | Gets the maximum depth at which many-valued lazy associations are automatically loaded while building the response. |
| ProxyLoadDepth | Gets the maximum depth at which single-valued lazy associations are automatically loaded while building the response. |
| PutMode | Gets how this request applies a PUT to the database. |
| Request | Gets the HTTP request being processed. |
| ResourceInfo | Gets the information about the resource addressed by the request URL. |
| Response | Gets the HTTP response that will be sent to the client. |
| RoutingPrecedence | Gets which endpoint wins when the request URL matches both an automatic CRUD endpoint and a service operation. |
| SerializeInstanceRef | Gets when an instance reference is written in the JSON response of this request. |
| SerializeInstance​Type | Gets when the object type is written in the JSON response of this request. |
| UnknownMember​Handling | Gets how this request behaves when the JSON received from the client contains a property that is not known. |