Interface IHttpResponse
Interface to create a HTTP Response.
Namespace: EmbedIO
Syntax
public interface IHttpResponse : IHttpMessage
Properties
ContentEncoding
Gets or sets the content encoding.
Declaration
Encoding? ContentEncoding { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Encoding> |
ContentLength64
Gets or sets the content length.
Declaration
long ContentLength64 { get; set; }
Property Value
Type | Description |
---|---|
Int64 |
ContentType
Gets or sets the type of the content.
Declaration
string ContentType { get; set; }
Property Value
Type | Description |
---|---|
String |
Headers
Gets the response headers.
Declaration
WebHeaderCollection Headers { get; }
Property Value
Type | Description |
---|---|
WebHeaderCollection |
KeepAlive
Gets or sets a value indicating whether [keep alive].
Declaration
bool KeepAlive { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
OutputStream
Gets the output stream.
Declaration
Stream OutputStream { get; }
Property Value
Type | Description |
---|---|
Stream |
SendChunked
Gets or sets a value indicating whether the response uses chunked transfer encoding.
Declaration
bool SendChunked { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
StatusCode
Gets or sets the status code.
Declaration
int StatusCode { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
StatusDescription
Gets or sets a text description of the HTTP status code.
Declaration
string StatusDescription { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
Close()
Closes this instance and dispose the resources.
Declaration
void Close()
SetCookie(Cookie)
Sets the cookie.
Declaration
void SetCookie(Cookie cookie)
Parameters
Type | Name | Description |
---|---|---|
Cookie | cookie | The session cookie. |