Methods
Public Class
Public Instance
Constants
VERSIONS | = | %w[1.0 1.1].freeze |
Attributes
headers | [R] | |
http_version | [R] | |
status_code | [R] |
Public Class methods
new(observer)
[show source]
# File lib/httpx/parser/http1.rb 12 def initialize(observer) 13 @observer = observer 14 @state = :idle 15 @buffer = "".b 16 @headers = {} 17 end
Public Instance methods
<<(chunk)
[show source]
# File lib/httpx/parser/http1.rb 19 def <<(chunk) 20 @buffer << chunk 21 parse 22 end
reset!()
[show source]
# File lib/httpx/parser/http1.rb 24 def reset! 25 @state = :idle 26 @headers.clear 27 @content_length = nil 28 @_has_trailers = nil 29 end