Instance Methodvapor 4.114.1Vapor

requireDecoder(for:)

Returns a ContentDecoder for the specified HTTPMediaType or throws an error.

ContentConfiguration.swift:128
func requireDecoder(for mediaType: HTTPMediaType) throws -> ContentDecoder
let coder = try ContentConfiguration.global.requireDecoder(for: .json)