Closed lkmill closed 5 years ago
This is because you cannot use partial types in the .types
function (https://github.com/jshttp/accepts#typetypes):
The types array can contain full MIME types or file extensions.
What are you trying to accomplish with the above?
ah, i see.
well i want the / to act as a catch all... essentially i want to return json if that matches the accept header, otherwise html.
https://github.com/midwest-js/responder/blob/master/index.js#L61
Would this work for your use-case? responses[req.accepts(['json']) || '*/*']
now that i know i am using it wrong i was planning on implementing something like that, yes. thanks for your quick answers!
No problem!