AcceptEncoding

class AcceptEncoding(val acceptEncoding: String, val parameters: List<HeaderValueParam> = emptyList()) : HeaderValueWithParameters

Represents the Accept-Encoding HTTP header, which specifies the content encoding the client is willing to accept.

Parameters

parameters

Optional list of parameters associated with the encoding, such as quality values (q-values).

Constructors

Link copied to clipboard
constructor(acceptEncoding: String, qValue: Double)

Constructs an AcceptEncoding instance with a specified encoding type and q-value.

constructor(acceptEncoding: String, parameters: List<HeaderValueParam> = emptyList())

Types

Link copied to clipboard
object Companion

Companion object containing predefined commonly used Accept-Encoding values.

Properties

Link copied to clipboard

The encoding type as a string, such as "gzip", "compress", "br", etc.

Link copied to clipboard

Functions

Link copied to clipboard

Extracts a Charset value from the given Content-Type, Content-Disposition or similar header value.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Checks if this AcceptEncoding matches a pattern AcceptEncoding, taking into account wildcard symbols * and parameters such as q-values.

Link copied to clipboard
fun parameter(name: String): String?

The first value for the parameter with name comparing case-insensitively or null if no such parameters found

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Returns a new AcceptEncoding instance with the specified q-value parameter.