GlidingSquirrel : SBRL.GlidingSquirrel.Http Namespace

HttpResponse Class

Represents an http response.

Syntax

public class HttpResponse : HttpMessage

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SBRL.GlidingSquirrel.Http
Assembly: GlidingSquirrel (in GlidingSquirrel.dll)
Assembly Versions: 0.0.0.0, 1.0.6562.35419, 1.0.6562.35930, 1.0.6566.37627, 1.0.6620.40465, 1.0.6629.34522, 1.0.6744.34319, 1.0.6744.34540, 1.0.6746.26208, 1.0.6746.26412, 1.0.6746.26518, 1.0.6746.26789, 1.0.6746.26804, 1.0.6746.26825, 1.0.6746.26834, 1.0.6746.26851, 1.0.6746.26854, 1.0.6746.27195, 1.0.6746.27200, 1.0.6786.21077, 1.0.6786.21083, 1.0.6786.38758, 1.0.6786.38797, 1.0.6786.38837, 1.0.6786.38901, 1.0.6786.38913, 1.0.6786.39083, 1.0.6786.39119, 1.0.6786.39136, 1.0.6786.39265

Members

See Also: Inherited members from HttpMessage.

Public Constructors

Creates a new http response.

Public Fields

Body System.IO.StreamReader . The request body. (Inherited from HttpMessage.)
Headers Dictionary<string, string> . A dictionary of key => value headers present in the message. (Inherited from HttpMessage.)
HttpVersion float . The version of the HTTP protocol in use. (Inherited from HttpMessage.)
ReadBufferSize int . The size of the buffer used when reading the response body and sending it to the client.
ResponseCode HttpResponseCode . The response status code.

Public Properties

ContentLength int . Quality of life property providing quick access to the length of the body of the message. (Inherited from HttpMessage.)
ContentType string . Quality of life property providing quick access to the content type of the message. (Inherited from HttpMessage.)
TransferEncoding string . Quality of life property providing quick access to the transfer encoding of the body of the message. (Inherited from HttpMessage.)

Public Methods

GetHeaderValue (string, string) : string
Fetches the value of a header present in the message. Returns the specified default value if no value was found. (Inherited from HttpMessage.)
RequireHttpBasicAuthentication (string)
Attaches a request for HTTP Basic Authentication to this request, and sets the HTTP response code to 401 Unauthorised.
SendTo (System.IO.StreamWriter) : System.Threading.Tasks.Task
Sends this HttpResponse to the specified destination.
SetBody (byte[]) : System.Threading.Tasks.Task
Sets the body to be the specified byte array.
SetBody (string) : System.Threading.Tasks.Task
Sets the body to be the specified string. This is a utility method that converts the supplied string into a stream compatible with HttpMessage and sets the appropriate properties to have the body accepted by the client, such as the ContentLength.

Member Details

HttpResponse Constructor

Creates a new http response.

Syntax

public HttpResponse ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SBRL.GlidingSquirrel.Http
Assembly: GlidingSquirrel (in GlidingSquirrel.dll)
Assembly Versions: 0.0.0.0, 1.0.6562.35419, 1.0.6562.35930, 1.0.6566.37627, 1.0.6620.40465, 1.0.6629.34522, 1.0.6744.34319, 1.0.6744.34540, 1.0.6746.26208, 1.0.6746.26412, 1.0.6746.26518, 1.0.6746.26789, 1.0.6746.26804, 1.0.6746.26825, 1.0.6746.26834, 1.0.6746.26851, 1.0.6746.26854, 1.0.6746.27195, 1.0.6746.27200, 1.0.6786.21077, 1.0.6786.21083, 1.0.6786.38758, 1.0.6786.38797, 1.0.6786.38837, 1.0.6786.38901, 1.0.6786.38913, 1.0.6786.39083, 1.0.6786.39119, 1.0.6786.39136, 1.0.6786.39265

ReadBufferSize Field

The size of the buffer used when reading the response body and sending it to the client.

Syntax

public int ReadBufferSize

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SBRL.GlidingSquirrel.Http
Assembly: GlidingSquirrel (in GlidingSquirrel.dll)
Assembly Versions: 0.0.0.0, 1.0.6562.35419, 1.0.6562.35930, 1.0.6566.37627, 1.0.6620.40465, 1.0.6629.34522, 1.0.6744.34319, 1.0.6744.34540, 1.0.6746.26208, 1.0.6746.26412, 1.0.6746.26518, 1.0.6746.26789, 1.0.6746.26804, 1.0.6746.26825, 1.0.6746.26834, 1.0.6746.26851, 1.0.6746.26854, 1.0.6746.27195, 1.0.6746.27200, 1.0.6786.21077, 1.0.6786.21083, 1.0.6786.38758, 1.0.6786.38797, 1.0.6786.38837, 1.0.6786.38901, 1.0.6786.38913, 1.0.6786.39083, 1.0.6786.39119, 1.0.6786.39136, 1.0.6786.39265

RequireHttpBasicAuthentication Method

Attaches a request for HTTP Basic Authentication to this request, and sets the HTTP response code to 401 Unauthorised.

Syntax

public void RequireHttpBasicAuthentication (string realm)

Parameters

realm
The authentication realm to request from the client.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SBRL.GlidingSquirrel.Http
Assembly: GlidingSquirrel (in GlidingSquirrel.dll)
Assembly Versions: 0.0.0.0, 1.0.6562.35419, 1.0.6562.35930, 1.0.6566.37627, 1.0.6620.40465, 1.0.6629.34522, 1.0.6744.34319, 1.0.6744.34540, 1.0.6746.26208, 1.0.6746.26412, 1.0.6746.26518, 1.0.6746.26789, 1.0.6746.26804, 1.0.6746.26825, 1.0.6746.26834, 1.0.6746.26851, 1.0.6746.26854, 1.0.6746.27195, 1.0.6746.27200, 1.0.6786.21077, 1.0.6786.21083, 1.0.6786.38758, 1.0.6786.38797, 1.0.6786.38837, 1.0.6786.38901, 1.0.6786.38913, 1.0.6786.39083, 1.0.6786.39119, 1.0.6786.39136, 1.0.6786.39265

ResponseCode Field

The response status code.

Syntax

public HttpResponseCode ResponseCode

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SBRL.GlidingSquirrel.Http
Assembly: GlidingSquirrel (in GlidingSquirrel.dll)
Assembly Versions: 0.0.0.0, 1.0.6562.35419, 1.0.6562.35930, 1.0.6566.37627, 1.0.6620.40465, 1.0.6629.34522, 1.0.6744.34319, 1.0.6744.34540, 1.0.6746.26208, 1.0.6746.26412, 1.0.6746.26518, 1.0.6746.26789, 1.0.6746.26804, 1.0.6746.26825, 1.0.6746.26834, 1.0.6746.26851, 1.0.6746.26854, 1.0.6746.27195, 1.0.6746.27200, 1.0.6786.21077, 1.0.6786.21083, 1.0.6786.38758, 1.0.6786.38797, 1.0.6786.38837, 1.0.6786.38901, 1.0.6786.38913, 1.0.6786.39083, 1.0.6786.39119, 1.0.6786.39136, 1.0.6786.39265

SendTo Method

Sends this HttpResponse to the specified destination.

Syntax

[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.CompilerServices.AsyncStateMachine(typeof(SBRL.GlidingSquirrel.Http.HttpResponse/<SendTo>d__6))]
public System.Threading.Tasks.Task SendTo (System.IO.StreamWriter destination)

Parameters

destination
The StreamWriter to send the response to.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SBRL.GlidingSquirrel.Http
Assembly: GlidingSquirrel (in GlidingSquirrel.dll)
Assembly Versions: 0.0.0.0, 1.0.6562.35419, 1.0.6562.35930, 1.0.6566.37627, 1.0.6620.40465, 1.0.6629.34522, 1.0.6744.34319, 1.0.6744.34540, 1.0.6746.26208, 1.0.6746.26412, 1.0.6746.26518, 1.0.6746.26789, 1.0.6746.26804, 1.0.6746.26825, 1.0.6746.26834, 1.0.6746.26851, 1.0.6746.26854, 1.0.6746.27195, 1.0.6746.27200, 1.0.6786.21077, 1.0.6786.21083, 1.0.6786.38758, 1.0.6786.38797, 1.0.6786.38837, 1.0.6786.38901, 1.0.6786.38913, 1.0.6786.39083, 1.0.6786.39119, 1.0.6786.39136, 1.0.6786.39265

SetBody Method

Sets the body to be the specified byte array.

Syntax

[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.CompilerServices.AsyncStateMachine(typeof(SBRL.GlidingSquirrel.Http.HttpResponse/<SetBody>d__4))]
public System.Threading.Tasks.Task SetBody (byte[] body)

Parameters

body
The byte array to set as the new body.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SBRL.GlidingSquirrel.Http
Assembly: GlidingSquirrel (in GlidingSquirrel.dll)
Assembly Versions: 0.0.0.0, 1.0.6562.35419, 1.0.6562.35930, 1.0.6566.37627, 1.0.6620.40465, 1.0.6629.34522, 1.0.6744.34319, 1.0.6744.34540, 1.0.6746.26208, 1.0.6746.26412, 1.0.6746.26518, 1.0.6746.26789, 1.0.6746.26804, 1.0.6746.26825, 1.0.6746.26834, 1.0.6746.26851, 1.0.6746.26854, 1.0.6746.27195, 1.0.6746.27200, 1.0.6786.21077, 1.0.6786.21083, 1.0.6786.38758, 1.0.6786.38797, 1.0.6786.38837, 1.0.6786.38901, 1.0.6786.38913, 1.0.6786.39083, 1.0.6786.39119, 1.0.6786.39136, 1.0.6786.39265

SetBody Method

Sets the body to be the specified string. This is a utility method that converts the supplied string into a stream compatible with HttpMessage and sets the appropriate properties to have the body accepted by the client, such as the ContentLength.

Syntax

[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.CompilerServices.AsyncStateMachine(typeof(SBRL.GlidingSquirrel.Http.HttpResponse/<SetBody>d__3))]
public System.Threading.Tasks.Task SetBody (string body)

Parameters

body
The string to set as the body.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SBRL.GlidingSquirrel.Http
Assembly: GlidingSquirrel (in GlidingSquirrel.dll)
Assembly Versions: 0.0.0.0, 1.0.6562.35419, 1.0.6562.35930, 1.0.6566.37627, 1.0.6620.40465, 1.0.6629.34522, 1.0.6744.34319, 1.0.6744.34540, 1.0.6746.26208, 1.0.6746.26412, 1.0.6746.26518, 1.0.6746.26789, 1.0.6746.26804, 1.0.6746.26825, 1.0.6746.26834, 1.0.6746.26851, 1.0.6746.26854, 1.0.6746.27195, 1.0.6746.27200, 1.0.6786.21077, 1.0.6786.21083, 1.0.6786.38758, 1.0.6786.38797, 1.0.6786.38837, 1.0.6786.38901, 1.0.6786.38913, 1.0.6786.39083, 1.0.6786.39119, 1.0.6786.39136, 1.0.6786.39265