Interface IHttpResponse
Defines the contract for an HTTP response.
public interface IHttpResponse
Properties
Body
Gets the response body output stream.
Stream Body { get; }
Property Value
ContentLength
Gets or sets the content length of the response body in bytes.
long ContentLength { get; set; }
Property Value
ContentType
Gets or sets the MIME content type of the response.
string ContentType { get; set; }
Property Value
KeepAlive
Gets or sets a value indicating whether the connection should be kept alive.
bool KeepAlive { get; set; }
Property Value
RedirectLocation
Gets or sets the redirect location URL for redirect responses.
string RedirectLocation { get; set; }
Property Value
StatusCode
Gets or sets the HTTP status code of the response.
int StatusCode { get; set; }
Property Value
Methods
AddHeader(string, string)
Adds a header with the specified name and value to the response.
void AddHeader(string name, string value)