Class: RFuzz::HttpResponse

Inherits:
Hash
  • Object
show all
Defined in:
lib/rfuzz/client.rb

Overview

A simple hash is returned for each request made by HttpClient with the headers that were given by the server for that request. Attached to this are four attributes you can play with:

* http_reason
* http_version
* http_status
* http_body

These are set internally by the Ragel/C parser so they’re very fast and pretty much C voodoo. You can modify them without fear once you get the response.

Instance Attribute Summary collapse

Instance Attribute Details

#http_bodyObject

The http body of the response, in the raw



32
33
34
# File 'lib/rfuzz/client.rb', line 32

def http_body
  @http_body
end

#http_chunk_sizeObject

When parsing chunked encodings this is set



35
36
37
# File 'lib/rfuzz/client.rb', line 35

def http_chunk_size
  @http_chunk_size
end

#http_reasonObject

The reason returned in the http response (“OK”,“File not found”,etc.)



23
24
25
# File 'lib/rfuzz/client.rb', line 23

def http_reason
  @http_reason
end

#http_statusObject

The status code (as a string!)



29
30
31
# File 'lib/rfuzz/client.rb', line 29

def http_status
  @http_status
end

#http_versionObject

The HTTP version returned.



26
27
28
# File 'lib/rfuzz/client.rb', line 26

def http_version
  @http_version
end