Delegate CreateStubResponse
Specifies the signature of a delegate that will create the stub response.
Namespace: Stubbery.RequestMatching
Assembly: Stubbery.dll
Syntax
public delegate object CreateStubResponse(HttpRequest request, RequestArguments args);
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Http.HttpRequest | request | The HTTP request. |
| RequestArguments | args | The arguments extracted from the HTTP request. |
Returns
| Type | Description |
|---|---|
| System.Object | The stubbed HTTP response. |
Remarks
The object returned by the CreateStubResponse delegate must be a string. That string will be directly written to the response body.