TResponse class
HTTP response representation
Declaration
TResponse = class(THTTPHeader)Inheritance
- TResponse
- THTTPHeader
- TObject
Description
TResponse represents an HTTP response sent back to a client.
It extends
THTTPHeader and provides methods to set status codes, headers, content,
cookies, and send the response data.
See also
Properties
EventsStarted | protected | |
Request | public | Associated HTTP request object |
Code | public | HTTP response status code |
CodeText | public | HTTP response status text |
Age | public | Age header value indicating response age in seconds |
Allow | public | Allow header value listing permitted HTTP methods |
CacheControl | public | Cache-Control header value for caching directives |
ContentLocation | public | Content-Location header value for alternate location |
ContentMD5 | public | Content-MD5 header value with MD5 digest of content |
ContentRange | public | Content-Range header value for partial content |
ETag | public | ETag header value for entity tag validation |
ProxyAuthenticate | public | Proxy-Authenticate header value for proxy authentication |
RetryAfter | public | Retry-After header value indicating when to retry request |
FirstHeaderLine | public | First line of HTTP response headers |
ContentStream | public | Stream containing response body content |
Content | public | Response body content as string |
Contents | public | String list containing response content lines |
HeadersSent | public | Indicates whether response headers have been sent |
ContentSent | public | Indicates whether response content has been sent |
Cookies | public | Collection of HTTP cookies to send with response |
FreeContentStream | public | Whether to automatically free the content stream |
Methods
DoSendHeaders | protected | |
DoSendContent | protected | |
CollectHeaders | protected | |
CheckServerEvents | protected | |
Create | public | Creates an HTTP response instance |
destroy | public | Destroys the HTTP response instance |
SendContent | public | Sends the response content to the client |
SendHeaders | public | Sends the response headers to the client |
SendResponse | public | Sends the complete HTTP response |
StartServerEvents | public | Starts server-sent events mode |
SendServerEvent | public | Sends a server-sent event |
EndServerEvents | public | Ends server-sent events mode |
SendRedirect | public | Sends a redirect response |
ToString | public | Returns string representation of the response |
SetStatus | public | Sets the HTTP status code and text |
Inherited
From THTTPHeader (73)
Accept AcceptCharset AcceptEncoding AcceptLanguage Authorization Connection ContentBytes ContentEncoding ContentFields ContentLanguage ContentLength ContentType Cookie CookieFields CustomHeaders Date Expires FieldCount FieldNames Fields FieldValues From GetCustomHeader GetFieldByName GetFieldValue GetHeader GetVariableHeaderName GetVariableHeaderType HeaderIsSet Host HTTPAccept HTTPAcceptCharset HTTPAcceptEncoding HTTPIfModifiedSince HTTPReferer HTTPUserAgent HttpVersion HTTPXRequestedWith IfModifiedSince IndexToHTTPHeader IndexToHTTPVariable LastModified LoadFromStream LoadFromStrings Location Method ParseContentType ParseCookies ParseFirstHeaderLine PathInfo PathTranslated Pragma ProtocolVersion Query QueryFields Referer RemoteAddr RemoteAddress RemoteHost ScriptName Server ServerPort SetContentFromString SetCookie SetCustomHeader SetFieldByName SetFieldValue SetHeader URL UserAgent Via Warning WWWAuthenticate
From TObject (39)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
