Definition
Assembly: CloudNimble.Breakdance.AspNetCore.dll Namespace: CloudNimble.Breakdance.AspNetCore Inheritance: System.ObjectSyntax
Summary
Helper methods for dealing with HttpRequestMessage.Methods
GetTestableHttpRequestMessage
Gets an HttpRequestMessage instance properly configured to be used to make test requests.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
httpMethod | System.Net.Http.HttpMethod | The HttpMethod to use for the request. |
host | string | The hostname to use for this request. Defaults to “http://localhost”, only change it if that collides with other services running on the local machine. |
routePrefix | string | The routePrefix corresponding to the route already mapped in MapRestierRoute or GetTestableConfiguration. Defaults to “api/test”, only change it if absolutely necessary. |
resource | string | The resource on the API to be requested. |
acceptHeader | string | The inbound MIME types to accept. Defaults to “application/json”. |
payload | object | - |
jsonSerializerSettings | System.Text.Json.JsonSerializerOptions | - |
Returns
Type:System.Net.Http.HttpRequestMessage
An HttpRequestMessage that is ready to be sent through an HttpClient instance configured for the test.