Table of Contents

Interface IHttpResponse

Namespace
VAST.HTTP
Assembly
VAST.Common.dll

Defines the contract for an HTTP response.

public interface IHttpResponse

Properties

Body

Gets the response body output stream.

Stream Body { get; }

Property Value

Stream

ContentLength

Gets or sets the content length of the response body in bytes.

long ContentLength { get; set; }

Property Value

long

ContentType

Gets or sets the MIME content type of the response.

string ContentType { get; set; }

Property Value

string

KeepAlive

Gets or sets a value indicating whether the connection should be kept alive.

bool KeepAlive { get; set; }

Property Value

bool

RedirectLocation

Gets or sets the redirect location URL for redirect responses.

string RedirectLocation { get; set; }

Property Value

string

StatusCode

Gets or sets the HTTP status code of the response.

int StatusCode { get; set; }

Property Value

int

Methods

AddHeader(string, string)

Adds a header with the specified name and value to the response.

void AddHeader(string name, string value)

Parameters

name string

The name of the header to add.

value string

The value of the header.