Http |
public class HttpServerResponse : HttpOutgoingRequestResponse
The HttpServerResponse type exposes the following members.
| Name | Description | |
|---|---|---|
| HttpServerResponse | Creates a new instance of the HttpServerResponse class. |
| Name | Description | |
|---|---|---|
| Client |
Always False.
(Overrides HttpRequestResponseClient) | |
| CloseStream |
When ContentSource is set to ContentStream (and a ContentStream is assigned),
this property determines if the stream should be closed automatically after sending it to the connection (true) or not (false).
(Inherited from HttpOutgoingRequestResponse) | |
| Code | Gets or sets the HTTP status code of the response. The default value is 200. | |
| ContentBytes |
Assigns a byte array to send back as the HTTP body to this property.
(Inherited from HttpOutgoingRequestResponse) | |
| ContentSource |
Defines which property (ContentBytes, ContentStream or ContentString) will be used to send the body of the response.
Assigning any of these three properties will automatically set the ContentSource property so that the content will always be sent from the appropriate source.
(Inherited from HttpOutgoingRequestResponse) | |
| ContentStream |
Assigns a stream to send back as HTTP body to this property. When assigned (and ContentSource is set to ContentStream),
you can use the CloseStream property to determine if the stream should be closed automatically after sending it to the connection (true) or not (false).
(Inherited from HttpOutgoingRequestResponse) | |
| ContentString |
Assigns a string to send back as HTTP body to this property.
(Inherited from HttpOutgoingRequestResponse) | |
| Encoding |
Determines the Encoding for the HTTP Request Response
(Inherited from HttpRequestResponse) | |
| HasOnTransferProgress |
Determines whether the current HTTPRequest Response has an OnTransferProgress event handler.
(Inherited from HttpRequestResponse) | |
| Header |
Get or set the HTTP Response Header
(Inherited from HttpRequestResponse) | |
| IsCompleted |
Gets a value that indicates whether the asynchronous operation completed.
(Inherited from HttpRequestResponse) | |
| KeepAlive |
Determines the keep alive status of the HTTP Outgoing Request Response.
(Inherited from HttpOutgoingRequestResponse) | |
| ResponseText | Gets or sets the HTTP status code description (For example, OK when the Code is 200). It is up to the caller to ensure that the Code and the ResponseText values correspond to each other. The default value is OK. | |
| Server |
Always True.
(Overrides HttpRequestResponseServer) | |
| ThisClient |
Gets the Client that is host to this Async request
(Inherited from HttpRequestResponse) |
| Name | Description | |
|---|---|---|
| CloneEvents |
Clones the events of the HTTP Request Response.
(Inherited from HttpRequestResponse) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| FinalizeHeader |
This method finalizes the HTTP header.
It sets the correct value of the Content-Length header and sets the HTTP version header to 1.1.
(Overrides HttpOutgoingRequestResponseFinalizeHeader) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| SendError(Int32, String) | Wraps the provided error message into an HTML document and puts the resulting document into ContentBytes. This method always sets the ResponseText to ERROR. | |
| SendError(Int32, String, Exception) | Wraps the provided System.Exception object, including the exception type name, exception message and full stacktrace into an HTML document and puts the resulting document into ContentBytes. | |
| SendError(Int32, String, String) | Wraps the provided error message into an HTML document and puts the resulting document into ContentBytes. | |
| SendErrorWithCustomBody | Allows to set custom error messages. Unlike the SendError methods, this method doesn't wrap the provided text into any HTML tags. The provided response body is used as is. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| TriggerOnTransferEnd |
Trigger the OnTransferEnd Event Handler
(Inherited from HttpRequestResponse) | |
| TriggerOnTransferProgress |
Trigger the OnTransferProgress Event Handler
(Inherited from HttpRequestResponse) | |
| TriggerOnTransferStart |
Trigger the OnTransferStart Event Handler
(Inherited from HttpRequestResponse) |
| Name | Description | |
|---|---|---|
| OnTransferEnd |
OnTransferEnd Event Handler
(Inherited from HttpRequestResponse) | |
| OnTransferProgress |
OnTransferProgress Event Handler
(Inherited from HttpRequestResponse) | |
| OnTransferStart |
OnTransferStart Event handler
(Inherited from HttpRequestResponse) |