ContentNegotiation
A plugin that serves two primary purposes:
Negotiating media types between the client and server. For this, it uses the
Accept
andContent-Type
headers.Serializing/deserializing the content in a specific format when sending requests and receiving responses. Ktor supports the following formats out-of-the-box:
JSON
,XML
, andCBOR
.
You can learn more from Content negotiation and serialization.
Types
Link copied to clipboard
A ContentNegotiation configuration that is used during installation.
Link copied to clipboard
object Plugin : HttpClientPlugin<ContentNegotiation.Config, ContentNegotiation>
Content copied to clipboard
A companion object used to install a plugin.