You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The router of WebEngine currently defaults to page requests unless specified with an Accept header, but I'm trying to enhance the usability of the default behaviour when prototyping APIs with curl.
Currently, we have this default config:
[router]default_content_type=text/html
but I'd like to extend this into two default states: default_content_type, and no_match_content_type.
no_match_content_type would be used if there was no match, or if there was not an Accept header sent.
default_content_type would be used if there was a loose match, and a default needed picking. Because there could be more ambiguity with this, default_content_type should be able to be a comma/semicolon separated list of content types, where the best match would be used, according to the provided accept header. For example: text/* could match text/plain and text/html. If you care about the difference, you should be able to specify it here.
Activity
tidy: improve request logging and default routing (#727)