extra
Sets an extra header parameter using a pre-built JsonElement, or removes it if value is null.
Parameters
name
the header parameter name
value
the header value, or null to remove the parameter
fun <T> extra(name: String, serializer: SerializationStrategy<T>, value: T?, jsonInstance: Json = Jwt.defaultJsonParser)(source)
Sets an extra header parameter using an explicit SerializationStrategy.
Parameters
name
the header parameter name
serializer
the serialization strategy for T
value
the header value, or null to remove the parameter
jsonInstance
the Json instance to use for serialization; defaults to the library's Jwt.defaultJsonParser configuration (ignoreUnknownKeys = true, explicitNulls = false)
Sets an extra header parameter, inferring the serializer from the reified type T.
Parameters
name
the header parameter name
value
the header value