Description
- If the user returns an instance of
starlette.response, send that through unmodified
- If the user returns a
string or bytes, send that through to the user, and do not set the media_type header
- Otherwise attempt to encode as JSON using the default
json package, and set the "application/json" media type header
The error message if encoding fails should list the user's three options.