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
Support RFC6839 allowing formatters for additional media types structured with syntax suffixes, like +json.
Valid examples are: application/calendar+json, application/problem+json, application/geo+json, etc (the full list can be seen on mime-db)...
Why?
Right now if you try to follow RFC7807 and send back a Content-Type application/problem+json, it won't find the correct formatter (which is json) and will override the content-type to application/octet-stream.
Example API
server.get('/',function(req,res,next){res.contentType='problem+json';res.send({"type": "https://example.com/probs/out-of-credit","title": "You do not have enough credit.","detail": "Your current balance is 30, but that costs 50."});});
Are you willing and able to implement this?
I'm converting PR #1786 from RFC7807 to RFC6839 and we can tackle RFC7807 on a separate issue.
The text was updated successfully, but these errors were encountered:
Additional media types (+json)
What?
Support RFC6839 allowing formatters for additional media types structured with syntax suffixes, like
+json
.Valid examples are:
application/calendar+json
,application/problem+json
,application/geo+json
, etc (the full list can be seen on mime-db)...Why?
Right now if you try to follow RFC7807 and send back a Content-Type
application/problem+json
, it won't find the correct formatter (which isjson
) and will override the content-type toapplication/octet-stream
.Example API
Are you willing and able to implement this?
I'm converting PR #1786 from
RFC7807
toRFC6839
and we can tackleRFC7807
on a separate issue.The text was updated successfully, but these errors were encountered: