Class: UV::Http::Headers

Inherits:
Hash
  • Object
show all
Defined in:
lib/uv-rays/http/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



15
16
17
# File 'lib/uv-rays/http/parser.rb', line 15

def body
  @body
end

#cookiesObject

Cookies at the time of the request



11
12
13
# File 'lib/uv-rays/http/parser.rb', line 11

def cookies
  @cookies
end

#http_versionObject

The HTTP version returned



5
6
7
# File 'lib/uv-rays/http/parser.rb', line 5

def http_version
  @http_version
end

#keep_aliveObject

Returns the value of attribute keep_alive.



13
14
15
# File 'lib/uv-rays/http/parser.rb', line 13

def keep_alive
  @keep_alive
end

#statusObject

The status code (as an integer)



8
9
10
# File 'lib/uv-rays/http/parser.rb', line 8

def status
  @status
end

Instance Method Details

#to_sObject Also known as: inspect



17
18
19
# File 'lib/uv-rays/http/parser.rb', line 17

def to_s
    "HTTP#{http_version} #{status} - keep alive: #{keep_alive}\nheaders: #{super}\nbody: #{body}"
end