Sign in Join
FPDoc Onlineexperiment

TResponse class

In unit HTTPDefs

HTTP response representation

Declaration

pascal
TResponse = class(THTTPHeader)

Inheritance

  1. TResponse
  2. THTTPHeader
  3. 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

EventsStartedprotected
RequestpublicAssociated HTTP request object
CodepublicHTTP response status code
CodeTextpublicHTTP response status text
AgepublicAge header value indicating response age in seconds
AllowpublicAllow header value listing permitted HTTP methods
CacheControlpublicCache-Control header value for caching directives
ContentLocationpublicContent-Location header value for alternate location
ContentMD5publicContent-MD5 header value with MD5 digest of content
ContentRangepublicContent-Range header value for partial content
ETagpublicETag header value for entity tag validation
ProxyAuthenticatepublicProxy-Authenticate header value for proxy authentication
RetryAfterpublicRetry-After header value indicating when to retry request
FirstHeaderLinepublicFirst line of HTTP response headers
ContentStreampublicStream containing response body content
ContentpublicResponse body content as string
ContentspublicString list containing response content lines
HeadersSentpublicIndicates whether response headers have been sent
ContentSentpublicIndicates whether response content has been sent
CookiespublicCollection of HTTP cookies to send with response
FreeContentStreampublicWhether to automatically free the content stream

Methods

DoSendHeadersprotected
DoSendContentprotected
CollectHeadersprotected
CheckServerEventsprotected
CreatepublicCreates an HTTP response instance
destroypublicDestroys the HTTP response instance
SendContentpublicSends the response content to the client
SendHeaderspublicSends the response headers to the client
SendResponsepublicSends the complete HTTP response
StartServerEventspublicStarts server-sent events mode
SendServerEventpublicSends a server-sent event
EndServerEventspublicEnds server-sent events mode
SendRedirectpublicSends a redirect response
ToStringpublicReturns string representation of the response
SetStatuspublicSets 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.