Table of Contents

Interface IResponse

Namespace
Dynamicweb.Environment
Assembly
Dynamicweb.Environment.dll
Interface IResponse is an abstraction of HttpResponse. Encapsulates HTTP-response information.
public interface IResponse

Properties

ContentType

Gets or sets the type of the content.
string ContentType { get; set; }

Property Value

string
The type of the content.

Cookies

Gets the cookies.
ICookieCollection Cookies { get; }

Property Value

ICookieCollection
The cookies.

Expires

Gets or sets the expires.
int Expires { get; set; }

Property Value

int
The expires.

IsClientConnected

Gets a value indicating whether this instance is client connected.
bool IsClientConnected { get; }

Property Value

bool
true if this instance is client connected; otherwise, false.

OutputStream

Gets the output stream.
Stream OutputStream { get; }

Property Value

Stream
The output stream.

Status

Gets or sets the status.
string Status { get; set; }

Property Value

string
The status.

StatusCode

Gets or sets the status code.
int StatusCode { get; set; }

Property Value

int
The status code.

StatusDescription

Gets or sets the status description.
string StatusDescription { get; set; }

Property Value

string
The status description.

Methods

AddHeader(string, string)

Adds the header.
void AddHeader(string name, string value)

Parameters

name string
The name.
value string
The value.

BinaryWrite(byte[])

Binaries the write.
void BinaryWrite(byte[] buffer)

Parameters

buffer byte[]
The buffer.

Clear()

Clears this instance.
void Clear()

ClearHeaders()

Clears the headers.
void ClearHeaders()

End()

Ends this instance.
void End()

Flush()

Flushes this instance.
void Flush()

IsValid()

Returns true if the response is valid.
bool IsValid()

Returns

bool
true if this instance is valid; otherwise, false.

Redirect(string)

Redirects the specified URL.
void Redirect(string url)

Parameters

url string
The URL.

Redirect(string, bool)

Redirects the specified URL.
void Redirect(string url, bool endResponse)

Parameters

url string
The URL.
endResponse bool
if set to true [end response].
Sets the cookie.
void SetCookie(Cookie cookie)

Parameters

cookie Cookie
The cookie.

Write(char)

Writes the specified character.
void Write(char value)

Parameters

value char
The character.

Write(char[], int, int)

Writes the specified buffer.
void Write(char[] buffer, int index, int count)

Parameters

buffer char[]
The buffer.
index int
The index.
count int
The count.

Write(object)

Writes the specified object.
void Write(object value)

Parameters

value object
The object.

Write(string)

Writes the specified string.
void Write(string value)

Parameters

value string
The string.
To top