Sisk

Method

HttpResponseExtensions.WithContent<THttpResponse>

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

WithContent<THttpResponse>(THttpResponse, string) #

Sets the content of the HTTP response to a string.

C#
public static THttpResponse WithContent<THttpResponse>(this THttpResponse response, string content) where THttpResponse : notnull, HttpResponse

Parameters #

response THttpResponse

content string

The string content to set.

Returns #

THttpResponse

The modified HTTP response.

Type Parameters #

THttpResponse

WithContent<THttpResponse>(THttpResponse, string, Encoding?, string) #

Sets the content of the HTTP response to a string with a specified encoding and MIME type.

C#
public static THttpResponse WithContent<THttpResponse>(this THttpResponse response, string content, Encoding? encoding, string mimeType) where THttpResponse : notnull, HttpResponse

Parameters #

response THttpResponse

content string

The string content to set.

encoding Encoding?

The encoding to use for the content. Can be null.

mimeType string

The MIME type of the content.

Returns #

THttpResponse

The modified HTTP response.

Type Parameters #

THttpResponse

WithContent<THttpResponse>(THttpResponse, HttpContent) #

Sets the content of the HTTP response to a specified HttpContent.

C#
public static THttpResponse WithContent<THttpResponse>(this THttpResponse response, HttpContent content) where THttpResponse : notnull, HttpResponse

Parameters #

response THttpResponse

content HttpContent

The HttpContent to set.

Returns #

THttpResponse

The modified HTTP response.

Type Parameters #

THttpResponse

Type to search the documentation and the API reference.