Table of Contents

Class HttpResponse

Namespace
Sisk.Core.Http
Assembly
Sisk.Core.dll

Represents an HTTP Response.

public class HttpResponse : CookieHelper
Inheritance
HttpResponse
Inherited Members
Extension Methods

Constructors

HttpResponse()

Creates an new HttpResponse instance with HTTP OK status code and no content.

HttpResponse(int)

Creates an new HttpResponse instance with given status code.

HttpResponse(int, HttpContent?)

Creates an new HttpResponse instance with given status code and HTTP content.

HttpResponse(HttpContent?)

Creates an new HttpResponse instance with given HTTP content, with default status code as 200 OK.

HttpResponse(HttpStatusCode)

Creates an new HttpResponse instance with given status code.

HttpResponse(HttpStatusCode, HttpContent?)

Creates an new HttpResponse instance with given status code and HTTP contents.

HttpResponse(string)

Creates an new HttpResponse instanec with given string content and status code as 200 OK.

Properties

Content

Gets or sets the HTTP response body contents.

Headers

Gets a HttpHeaderCollection instance of the HTTP response headers.

SendChunked

Gets or sets whether the HTTP response can be sent chunked.

Status

Gets or sets the HTTP response status code.

StatusInformation

Gets or sets the HTTP status code and description for this HTTP response.

Methods

CreateEmptyResponse()

Creates an HttpResponse object which closes the connection with the client immediately (ECONNRESET).

CreateRedirectResponse(RouteAction)

Creates an new redirect HttpResponse which redirects to the route path defined in a action. The provided method must have a valid RouteAttribute attribute.

CreateRedirectResponse(string)

Creates an new redirect HttpResponse with given location header.

GetRawHttpResponse(bool)

Gets the raw HTTP response message.

Refuse()

Creates an HttpResponse object which closes the connection with the client immediately (ECONNRESET).

SetCookieHeader(string, string)

Abstract method that calls the "Set-Cookie" header with the value of the created cookie.