Sha256: c482e831c7e0d534a6a293f3db46c1ed04d7b0bd3b94ce823a6aeac0694473c4

Contents?: true

Size: 1.22 KB

Versions: 50

Compression:

Stored size: 1.22 KB

Contents

module HTTPX
  module Parser
    class Error < HTTPX::Error
    end

    type parsed_headers = Hash[String, Array[String]]

    interface _HTTP1Events

      def on_start: () -> void
      def on_headers: (parsed_headers headers) -> void
      def on_trailers: (parsed_headers trailers) -> void
      def on_data: (String data) -> void
      def on_complete: () -> void
    end

    class HTTP1
      VERSIONS: Array[String]

      attr_reader status_code: Integer
      attr_reader http_version: [Integer, Integer]
      attr_reader headers: parsed_headers

      @observer: _HTTP1Events
      @state: Symbol
      @buffer: String
      @content_type: String?
      @content_length: Integer
      @_has_trailers: bool
      @upgrade: bool

      def <<: (String chunk) -> void

      def reset!: () -> void

      def upgrade?: () -> bool

      def upgrade_data: () -> String

      private

      def initialize: (_HTTP1Events observer) -> untyped

      def nextstate: (Symbol state) -> void

      def no_more_data?: () -> bool

      def parse: () -> void

      def parse_data: () -> void

      def parse_headers: () -> void

      def parse_headline: () -> void

      def prepare_data: (parsed_headers headers) -> void
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
httpx-1.2.4 sig/parser/http1.rbs
httpx-1.2.3 sig/parser/http1.rbs
httpx-1.2.2 sig/parser/http1.rbs
httpx-1.2.1 sig/parser/http1.rbs
httpx-1.2.0 sig/parser/http1.rbs
httpx-1.1.5 sig/parser/http1.rbs
httpx-1.1.4 sig/parser/http1.rbs
httpx-1.1.3 sig/parser/http1.rbs
httpx-1.1.2 sig/parser/http1.rbs
httpx-1.1.1 sig/parser/http1.rbs
httpx-1.1.0 sig/parser/http1.rbs
httpx-1.0.2 sig/parser/http1.rbs
httpx-0.24.7 sig/parser/http1.rbs
httpx-1.0.1 sig/parser/http1.rbs
httpx-1.0.0 sig/parser/http1.rbs
httpx-0.24.6 sig/parser/http1.rbs
httpx-0.24.5 sig/parser/http1.rbs
httpx-0.24.4 sig/parser/http1.rbs
httpx-0.24.3 sig/parser/http1.rbs
httpx-0.24.2 sig/parser/http1.rbs