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(in HttpStatusInformation)

Creates an new HttpResponse instance with given status code.

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 or sets the 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 status code and description for this HTTP response.

Methods

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.