Sha256: 8405879d965dd3adbb0595eaae6cb3853db256a79d71eeb56edc485b4e0696f8

Contents?: true

Size: 1.23 KB

Versions: 56

Compression:

Stored size: 1.23 KB

Contents

module HTTPX
  class Headers
    include _ToS

    @headers: Hash[String, Array[String]]

    def self.new: (?untyped headers) -> instance

    def ==: (untyped other) -> bool

    def []: (String field) -> String?
    def []=: (String field, headers_value value) -> void

    def add: (String field, string value) -> void
    def delete: (String field) -> Array[String]?

    def each: (?_Each[[String, String]]? extra_headers) { (String k, String v) -> void } -> void
            | (?_Each[[String, String]]? extra_headers) -> Enumerable[[String, String]]

    def get: (String field) -> Array[String]
    def key?: (String downcased_key) -> bool

    def merge: (_Each[[String, headers_value]] other) -> Headers

    def same_headers?: (untyped headers) -> bool

    def to_a: () -> Array[[String, String]]
    def to_hash: () -> Hash[String, String]
    alias to_h to_hash

    def inspect: () -> String

    private

    def initialize: (?headers?) -> untyped
    def array_value: (headers_value) -> Array[String]
    def downcased: (_ToS field) -> String
  end

  type headers_value = _ToS | Array[_ToS]
  type headers_hash = Hash[_ToS, headers_value]
  type headers_input = headers_hash | Array[[_ToS, string]]
  type headers = Headers | headers_input
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
httpx-1.3.4 sig/headers.rbs
httpx-1.3.3 sig/headers.rbs
httpx-1.3.2 sig/headers.rbs
httpx-1.3.1 sig/headers.rbs
httpx-1.3.0 sig/headers.rbs
httpx-1.2.6 sig/headers.rbs
httpx-1.2.4 sig/headers.rbs
httpx-1.2.3 sig/headers.rbs
httpx-1.2.2 sig/headers.rbs
httpx-1.2.1 sig/headers.rbs
httpx-1.2.0 sig/headers.rbs
httpx-1.1.5 sig/headers.rbs
httpx-1.1.4 sig/headers.rbs
httpx-1.1.3 sig/headers.rbs
httpx-1.1.2 sig/headers.rbs
httpx-1.1.1 sig/headers.rbs
httpx-1.1.0 sig/headers.rbs
httpx-1.0.2 sig/headers.rbs
httpx-0.24.7 sig/headers.rbs
httpx-1.0.1 sig/headers.rbs