Method WithContent<THttpResponse>
Namespace: Sisk.Core.Http
Assembly: Sisk.Core.dll
WithContent<THttpResponse>(THttpResponse, string)
Sets an UTF-8 string as the HTTP response content in this HttpResponse.
public static THttpResponse WithContent<THttpResponse>(this THttpResponse response, string content) where THttpResponse : HttpResponse
Parameters
response THttpResponse
The HttpResponse object.
content string
The UTF-8 string containing the response body.
Returns
THttpResponse
The self THttpResponse object.
Type Parameters
THttpResponse
The type which implements HttpResponse.
WithContent<THttpResponse>(THttpResponse, string, Encoding?, string)
Sets an string as the HTTP response content in this HttpResponse.
public static THttpResponse WithContent<THttpResponse>(this THttpResponse response, string content, Encoding? encoding, string mimeType) where THttpResponse : HttpResponse
Parameters
response THttpResponse
The HttpResponse object.
content string
The string containing the response body.
encoding Encoding?
The encoding to encode the string message.
mimeType string
The mime-type of the response content.
Returns
THttpResponse
The self THttpResponse object.
Type Parameters
THttpResponse
The type which implements HttpResponse.
WithContent<THttpResponse>(THttpResponse, HttpContent)
Sets an HttpContent as the HTTP content body in this HttpResponse.
public static THttpResponse WithContent<THttpResponse>(this THttpResponse response, HttpContent content) where THttpResponse : HttpResponse
Parameters
response THttpResponse
The HttpResponse object.
content HttpContent
The HTTP content object.
Returns
THttpResponse
The self THttpResponse object.
Type Parameters
THttpResponse
The type which implements HttpResponse.
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語