GenHTTP icon indicating copy to clipboard operation
GenHTTP copied to clipboard

Allow to easily deserialize responses in tests

Open Kaliumhexacyanoferrat opened this issue 1 year ago • 0 comments

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

Kaliumhexacyanoferrat avatar Jan 05 '24 11:01 Kaliumhexacyanoferrat