Prefers property/method on `Request`
Closed this issue · 2 comments
jdmcd commented
In order to determine what the client prefers
tanner0101 commented
looks like NIO is parsing this, but not exposing the APIs to do it. Will need to bring over the code from Vapor 2.
tanner0101 commented
Added in #272, thanks for reporting!
httpReq.accept.mediaTypes.contains(.html)
httpReq.accept.comparePreference(for: .json, to: .html)