[This is preliminary documentation and is subject to change.]
The Response type exposes the following members.Constructors
| Name | Description | |
|---|---|---|
| Response | Initializes a new instance of the Response class |
Methods
| Name | Description | |
|---|---|---|
| AddHeader |
Adds Http header
| |
| AppendCookie |
Appends cookie to the response
| |
| CancelBuffered |
Cancels the buffered content. Throws if the response is not Buffered
| |
| Destructor | (Overrides DisposableObject Destructor .) | |
| Dispose |
Deterministically disposes object. DO NOT OVERRIDE this method, override Destructor() instead
(Inherited from DisposableObject.) | |
| EnsureObjectNotDisposed |
Checks to see whether object dispose started or has already been disposed and throws an exception if Dispose() was called
(Inherited from DisposableObject.) | |
Determines whether the specified object is equal to the current object. (Inherited from | ||
| Finalize | (Inherited from DisposableObject.) | |
| Flush |
RESERVED FOR FUTURE USE. Flushes the internally buffered content
| |
| GetClientVar |
Provides access to client state object which gets persisted as a cookie.
Client states need to be used instead of cookies because of some HttpListener+Browser limitations
that can not parse multiple cookies set into one Set-Cookie header
| |
| GetClientVarNames |
Provides access to client state object which gets persisted as a cookie.
Client states need to be used instead of cookies because of some HttpListener+Browser limitations
that can not parse multiple cookies set into one Set-Cookie header
| |
| GetDirectOutputStreamForWriting |
Returns output stream for direct output and marks response as beeing written into
| |
Serves as the default hash function. (Inherited from | ||
Gets the (Inherited from | ||
Creates a shallow copy of the current (Inherited from | ||
| Redirect |
Configures response with redirect status and headers. This method DOES NOT ABORT the work pipeline,so
the processing of filters and handlers continues unless 'work.Aborted = true' is issued in code.
See also 'RedirectAndAbort(url)'
| |
| RedirectAndAbort |
Configures response with redirect status and headers. This method also aborts the work pipeline,so
the processing of filters and handlers does not continue. See also 'Redirect(url)'
| |
| SetCacheControlHeaders | ||
| SetClientVar |
Provides access to client state object which gets persisted as a cookie.
Client states need to be used instead of cookies because of some HttpListener+Browser limitations
that can not parse multiple cookies set into one Set-Cookie header.
Pass null for value to delete the var form the collection. The values are generally expected to be base64 encoded by the caller
| |
| SetNoCacheHeaders |
Sets headers so all downstream, layers (browsers, proxies) do not cache response.
If Force==true(default) then overrides existing headers with no cache.
Returns true when headers were set
| |
Returns a string that represents the current object. (Inherited from | ||
| Write(Object) |
Writes an object into response as string
| |
| Write(String) |
Writes a string into response
| |
| WriteFile |
Write the file to the client so client can download it. May set Buffered=false to use chunked encoding for big files
| |
| WriteJSON |
Writes an object as JSON. Does nothing if object is null
| |
| WriteLine(Object) |
Writes an object into response as string
| |
| WriteLine(String) |
Writes a string into response
| |
| WriteStream |
Write the contents of the stream to the client so client can download it. May set Buffered=false to use chunked encoding for big files
|
Extension Methods
Fields
| Name | Description | |
|---|---|---|
| DEFAULT_DOWNLOAD_BUFFER_SIZE | ||
| MAX_DOWNLOAD_BUFFER_SIZE | ||
| MAX_DOWNLOAD_FILE_SIZE | ||
| MIN_DOWNLOAD_BUFFER_SIZE | ||
| Work |
Properties
| Name | Description | |
|---|---|---|
| Buffered |
Determines whether the content is buffered locally. This property can not be set after
the response has been written to
| |
| ClientVarsChanged |
Returns true if current request processing cycle has changed the client var
| |
| ContentType |
Http content type
| |
| Disposed |
Indicates whether this object was already disposed - the Dispose() has finished
(Inherited from DisposableObject.) | |
| DisposeStarted |
Indicates whether this object Dispose() has been called and dispose started but not finished yet
(Inherited from DisposableObject.) | |
| Encoding |
Gets/sets content encoding
| |
| Headers |
Returns http headers of the response
| |
| StatusCode |
Http status code
| |
| StatusDescription |
Http status description
| |
| WasWrittenTo |
Returns true if some output has been performed
|
See Also