GenHTTP
GenHTTP copied to clipboard
Allow to easily deserialize responses in tests
As a developer of a test method using the GenHTTP.Testing
module, I would like to easily deserialize the result of a request into a known type, so that I can quickly verify my assumptions.
Example
var result = respone.GetContentAsync<MyClass>();
Acceptance criteria
- The method throws a meaningful exception if the response cannot be parsed
- The method uses the correct deserializer for the specified
Content-Type
of the response (so it works for XML for example) and falls back to JSON - The functionality is documented on the website