Static Propertyvapor 4.114.1Vapor
compressible
A list of known compressible MIME types.
static let compressible: HTTPMediaTypeSet
If you know a type would almost always benefit from on-the-wire compression, please add it to this list!
A list of known compressible MIME types.
static let compressible: HTTPMediaTypeSet
If you know a type would almost always benefit from on-the-wire compression, please add it to this list!
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct HTTPMediaTypeSet
A collection for efficiently determining if a set of types contains another type.
init(arrayLiteral elements: HTTPMediaType...)
init(mediaTypes: some Sequence<HTTPMediaType>)
static let all: HTTPMediaTypeSet
The super set of all HTTPMediaType
s.
static let incompressible: HTTPMediaTypeSet
A list of known incompressible MIME types.
static let none: HTTPMediaTypeSet
The empty set of HTTPMediaType
s.
func contains(_ mediaType: HTTPMediaType) -> Bool
Check to see if a media type is contained within the set.