Instance Method
use(decoder:for:)
Adds a
ContentDecoder for the specified HTTPMediaType.mutating func use(decoder: any ContentDecoder, for mediaType: HTTPMediaType)
Parameters
decoderContentDecoderto use.mediaTypeContentDecoderwill be used to decode thisHTTPMediaType.
Discussion
contentConfig.use(decoder: JSONDecoder(), for: .json)