C# Class Stumps.FluentBasicHttpResponseExtensions

A class that provides a set of Fluent extension methods to T:Stumps.BasicHttpResponse objects.
Mostra file Open project: Cayan-LLC/stumps

Public Methods

Method Description
WithBody ( this response, byte buffer ) : BasicHttpResponse

Specifies the body returned as part of the HTTP response.

WithBody ( this response, string body ) : BasicHttpResponse

Specifies the body returned as part of the HTTP response.

WithFile ( this response, string path ) : BasicHttpResponse

Specifies the body returned as part of the HTTP response.

WithHeader ( this response, string headerName, string headerValue ) : BasicHttpResponse

Specifies a header returned as part of the HTTP response.

WithRedirectAddress ( this response, string redirectAddress ) : BasicHttpResponse

Specifies the redirect address returned as part of the HTTP response.

WithStatusCode ( this response, int statusCode ) : BasicHttpResponse

Specifies the status code returned as part of the HTTP response.

WithStatusDescription ( this response, string statusDescription ) : BasicHttpResponse

Specifies the description of the status code returned as part of the HTTP response.

Method Details

WithBody() public static method

Specifies the body returned as part of the HTTP response.
is null.
public static WithBody ( this response, byte buffer ) : BasicHttpResponse
response this The that returns in response to an HTTP request.
buffer byte The byte array to return as the body of the HTTP response.
return BasicHttpResponse

WithBody() public static method

Specifies the body returned as part of the HTTP response.
is null.
public static WithBody ( this response, string body ) : BasicHttpResponse
response this The that returns in response to an HTTP request.
body string The value returned as body of the HTTP response.
return BasicHttpResponse

WithFile() public static method

Specifies the body returned as part of the HTTP response.
is null.
public static WithFile ( this response, string path ) : BasicHttpResponse
response this The that returns in response to an HTTP request.
path string The path to the file that contains the HTTP response.
return BasicHttpResponse

WithHeader() public static method

Specifies a header returned as part of the HTTP response.
is null.
public static WithHeader ( this response, string headerName, string headerValue ) : BasicHttpResponse
response this The that returns in response to an HTTP request.
headerName string The name of the header.
headerValue string The value of the header.
return BasicHttpResponse

WithRedirectAddress() public static method

Specifies the redirect address returned as part of the HTTP response.
is null.
public static WithRedirectAddress ( this response, string redirectAddress ) : BasicHttpResponse
response this The that returns in response to an HTTP request.
redirectAddress string The redirect address returned as part of the HTTP response.
return BasicHttpResponse

WithStatusCode() public static method

Specifies the status code returned as part of the HTTP response.
is null.
public static WithStatusCode ( this response, int statusCode ) : BasicHttpResponse
response this The that returns in response to an HTTP request.
statusCode int The status code to return.
return BasicHttpResponse

WithStatusDescription() public static method

Specifies the description of the status code returned as part of the HTTP response.
is null.
public static WithStatusDescription ( this response, string statusDescription ) : BasicHttpResponse
response this The that returns in response to an HTTP request.
statusDescription string The description of the status code.
return BasicHttpResponse