Add response format middleware for JSON/XML output, updated README about this topic
Summary
In this PR a Response Format Middleware was created. It that allows API consumers to request responses in either JSON or XML format.
JSON format is the default format.
How to Test
Open Swagger UI and:
-
Call any endpoint (/api/Book/list), expected format of the output is JSON.
-
Now call the same endpoint but add to the URL (api/Book/list?format=xml), expected format of the ouput is XML.