Skip to main content

HttpListenerResponse Class

Namespace: System.Net · Assembly: GHIElectronics.TinyCLR.Networking.Http

Represents a response to a request being handled by an System.Net.HttpListener object.

public sealed class HttpListenerResponse : IDisposable

Properties

StatusCode

public int StatusCode { get; set; }

Gets or sets the HTTP status code to be returned to the client.

ContentLength64

public long ContentLength64 { get; set; }

Gets or sets the number of bytes in the body data included in the response.

Headers

public WebHeaderCollection Headers { get; set; }

Gets or sets the collection of header name/value pairs that is returned by the server.

KeepAlive

public bool KeepAlive { get; set; }

Gets or sets whether the server requests a persistent connection.

OutputStream

public Stream OutputStream { get; }

Gets a Stream object to which a response can be written.

ProtocolVersion

public Version ProtocolVersion { get; set; }

Gets or sets the HTTP version that is used for the response.

RedirectLocation

public string RedirectLocation { get; set; }

Gets or sets the value of the HTTP Location header in this response.

SendChunked

public bool SendChunked { get; set; }

Gets or sets whether the response uses chunked transfer encoding.

ContentEncoding

public Encoding ContentEncoding { get; set; }

Gets or sets the encoding for this response's OutputStream .

ContentType

public string ContentType { get; set; }

Gets or sets the MIME type of the returned content.

StatusDescription

public string StatusDescription { get; set; }

Gets or sets a text description of the HTTP status code that is returned to the client.

Methods

Detach()

public void Detach()

No description available.

Close()

public void Close()

Sends the response to the client and releases the resources held by this HttpListenerResponse instance.