-
Notifications
You must be signed in to change notification settings - Fork 5
Default response
Martijn Bodeman edited this page Jul 9, 2022
·
2 revisions
Configure a default response using the Fallback
property, which will be used to return a response when the request does not match any setup.
mockHttp.Fallback.Respond(with => with.StatusCode(HttpStatusCode.BadRequest));
You can use all the respond extension methods, not just return a status code as per example.
By default, HttpStatusCode.NotFound
is returned.