Class: HTTP::Headers

Inherits:
Object show all
Defined in:
lib/http_client/jruby/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(native_response) ⇒ Headers

Returns a new instance of Headers.


24
25
26
# File 'lib/http_client/jruby/response.rb', line 24

def initialize(native_response)
  @native_response = native_response
end

Instance Method Details

#[](header_name) ⇒ Object


28
29
30
# File 'lib/http_client/jruby/response.rb', line 28

def [](header_name)
  @native_response.get_first_header(header_name).value
end