C# Класс Stumps.BasicHttpResponse

A class representing a simple and basic HTTP response.
Наследование: IStumpsHttpResponse
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

AppendToBody() публичный Метод

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.
Результат void

AppendToBody() публичный Метод

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.
Результат void

AppendToBody() публичный Метод

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.
Результат void

BasicHttpResponse() публичный Метод

Initializes a new instance of the T:Stumps.BasicHttpResponse class.
public BasicHttpResponse ( ) : System
Результат System

ClearBody() публичный Метод

Clears the existing body of the HTTP response.
public ClearBody ( ) : void
Результат void

GetBody() публичный Метод

Gets the bytes for the HTTP body.
public GetBody ( ) : byte[]
Результат byte[]

GetBodyAsString() публичный Метод

Gets the body of the HTTP response as a T:System.String.
The body is decoded using UTF8 encoding.
public GetBodyAsString ( ) : string
Результат string

GetBodyAsString() публичный Метод

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 .
Результат string