Interface IHttpResponseBuilder
Fluent builder for a single stub HTTP response (status, body, media type).
Assembly: BlazorToolkit.Previews.dll
public interface IHttpResponseBuilder
Methods
WithContent(string, string)
Sets a body with an explicit media type.
Declaration
IHttpResponseBuilder WithContent(string content, string mediaType)
Parameters
Returns
Sets a JSON body (media type application/json).
Declaration
IHttpResponseBuilder WithJson(string json)
Parameters
| Type |
Name |
Description |
| string |
json |
|
Returns
Sets the HTTP status code.
Declaration
IHttpResponseBuilder WithStatus(int statusCode)
Parameters
| Type |
Name |
Description |
| int |
statusCode |
|
Returns