Instance Methodvapor 4.114.1Vapor

serialize

Converts this MediaType into its string representation.

HTTPMediaType.swift:106
func serialize() -> String

Parameters

[“charset”: “utf8”]

For example, the following media type:

  • type: "application"

  • subtype: "json"

Would be converted to "application/json; charset=utf8".