Skip to content

Instance Method

comparePreference(for:to:)

Returns ComparisonResult comparing the supplied MediaTypes against these preferences.
func comparePreference(for a: HTTPMediaType, to b: HTTPMediaType) -> ComparisonResult

Discussion

let pref = httpReq.accept.comparePreference(for: .json, to: .html)