C# Class Stumps.BasicHttpResponse

A class representing a simple and basic HTTP response.
Inheritance: IStumpsHttpResponse
Afficher le fichier Open project: Cayan-LLC/stumps Class Usage Examples

Méthodes publiques

Méthode Description
AppendToBody ( byte buffer ) : void

Appends a byte array to the body of the HTTP response.

AppendToBody ( string value ) : void

Appends a string value to the body of the HTTP response.

The value will be converted to a byte array using UTF8 encoding.

AppendToBody ( string value, Encoding encoding ) : void

Appends a string value to the body of the HTTP response using a specified encoding.

BasicHttpResponse ( ) : System

Initializes a new instance of the T:Stumps.BasicHttpResponse class.

ClearBody ( ) : void

Clears the existing body of the HTTP response.

GetBody ( ) : byte[]

Gets the bytes for the HTTP body.

GetBodyAsString ( ) : string

Gets the body of the HTTP response as a T:System.String.

The body is decoded using UTF8 encoding.

GetBodyAsString ( Encoding encoding ) : string

Gets the body of the HTTP response as a T:System.String.

The body is decoded using UTF8 encoding.

Method Details

AppendToBody() public méthode

Appends a byte array to the body of the HTTP response.
public AppendToBody ( byte buffer ) : void
buffer byte The bytes to append to the body of the response.
Résultat void

AppendToBody() public méthode

Appends a string value to the body of the HTTP response.
The value will be converted to a byte array using UTF8 encoding.
public AppendToBody ( string value ) : void
value string The value to append to the body of the HTTP response.
Résultat void

AppendToBody() public méthode

Appends a string value to the body of the HTTP response using a specified encoding.
public AppendToBody ( string value, Encoding encoding ) : void
value string The value to append to the body of the HTTP response.
encoding System.Text.Encoding The encoding used to convert the into a byte array.
Résultat void

BasicHttpResponse() public méthode

Initializes a new instance of the T:Stumps.BasicHttpResponse class.
public BasicHttpResponse ( ) : System
Résultat System

ClearBody() public méthode

Clears the existing body of the HTTP response.
public ClearBody ( ) : void
Résultat void

GetBody() public méthode

Gets the bytes for the HTTP body.
public GetBody ( ) : byte[]
Résultat byte[]

GetBodyAsString() public méthode

Gets the body of the HTTP response as a T:System.String.
The body is decoded using UTF8 encoding.
public GetBodyAsString ( ) : string
Résultat string

GetBodyAsString() public méthode

Gets the body of the HTTP response as a T:System.String.
The body is decoded using UTF8 encoding.
public GetBodyAsString ( Encoding encoding ) : string
encoding System.Text.Encoding The encoding used to convert the HTTP body into a .
Résultat string