Skip to content

2.9.0.0

Choose a tag to compare

@github-actions github-actions released this 15 Apr 14:38

Add support to configure expected request content.
This can be particularly useful if you want to match a route for a specific request body.

For example:

handler
.RespondTo()
.Post()
.ForUrl("/search")
.ForContent(@"{""params"":{""foo"":""bar""}}")
.With(HttpStatusCode.OK);

will only match when the request body is exactly {"params":{"foo":"bar"}}.

Currently only string content is supported.