Other Type Aliases

The following type aliases are available globally.

  • A callback for dynamically setting http headers when connection & reconnecting to a stream or on every poll request. This function should return a copy of the headers recieved with any modifications or additions needed. Removing headers is discouraged as it may cause requests to fail.

    Declaration

    Swift

    public typealias RequestHeaderTransform = (_ url: URL, _ headers: [String : String]) -> [String : String]

    Parameters

    url

    The endpoint that is being connected to

    headers

    The default headers that would be used

    Return Value

    The headers that will be used in the request