TTMSMCPHTTPServerRequest Class
One incoming request, as it is presented to a handler.
API unit family: TMS.MCP.HTTPServer
Inherits from: TPersistent
Syntax
TTMSMCPHTTPServerRequest = class(TPersistent)
Remarks
Created and owned by the server for the duration of the request and passed to the handler; do not free it, and do not keep a reference past the end of the handler. Everything but the headers is read-only, since it describes a request that has already arrived. The concrete values come from the platform's own server implementation, which is why this class declares them but leaves them to a descendant to supply.
Properties
| Name | Description |
|---|---|
| Command | The request method as it arrived, in text. Read-only. |
| CommandType | The request method in recognized form. Read-only. |
| Headers | The headers that arrived with the request. |
| PostStream | The request body as a stream, or nil when the request has no body. Read-only. |
| QueryParams | The query string, without the leading question mark. Read-only. |
| RemoteIP | Address the request came from. Read-only. |
| RemotePort | Port the request came from. Read-only. |
| URI | The requested path, without the query string. Read-only. |
| VersionMajor | Major protocol version the request was sent with. Read-only. |
| VersionMinor | Minor protocol version the request was sent with. Read-only. |
Methods
| Name | Description |
|---|---|
| IsVersionAtLeast | Reports whether the request's protocol version is at least the one given. |