4 ms·
When I was writing some of our internal HTTP apis, I came up with a reasonable compromise -- honor the Accept header, but treat any file extension as a limitati
by kd5bjo 17y ago
When I was writing some of our internal HTTP apis, I came up with a reasonable compromise -- honor the Accept header, but treat any file extension as a limitation of it. .../foo could return any supported type, but .../foo.html is, by definition, the HTML version of the resource (and will return a 406 Not Acceptable if the Accept header doesn't include text/html, text/(star), or (star)/(star) ).
EDIT: the asterisks in my MIME type notations were interpreted as markup.