CustomHeader


class CustomHeader


A HTTP header name-value pair that will be sent on all requests to origins that match the given origin rules.

Summary

Public constructors

CustomHeader(
    name: String,
    value: String,
    originRules: (Mutable)Set<String!>
)

Create a new custom header for the given name and value, to be added to requests that match the given origin originRules

Public functions

Boolean
equals(obj: Any?)

Two instances of CustomHeader are equal if the header name and value, and rule set are equal.

String

HTTP Header name

(Mutable)Set<String!>

Origin patterns where this header is being sent.

String

HTTP Header value

Int

HashCode for CustomHeader is derived from the individual fields.-

Public constructors

CustomHeader

CustomHeader(
    name: String,
    value: String,
    originRules: (Mutable)Set<String!>
)

Create a new custom header for the given name and value, to be added to requests that match the given origin originRules

Parameters
name: String

A valid HTTP header name string

value: String

A valid HTTP value name string

originRules: (Mutable)Set<String!>

a set of origin originRules following the same format as addWebMessageListener

Public functions

equals

fun equals(obj: Any?): Boolean

Two instances of CustomHeader are equal if the header name and value, and rule set are equal.

getName

fun getName(): String

HTTP Header name

getRules

fun getRules(): (Mutable)Set<String!>

Origin patterns where this header is being sent.

The rules use the format described in the documentation for addWebMessageListener.

getValue

fun getValue(): String

HTTP Header value

hashCode

fun hashCode(): Int

HashCode for CustomHeader is derived from the individual fields.-