Class: Censys::HTTPResponse
- Inherits:
-
Object
- Object
- Censys::HTTPResponse
- Defined in:
- lib/censys/http_response.rb
Instance Method Summary collapse
-
#body ⇒ String
HTTP body.
-
#header ⇒ Hash
HTTP header.
-
#initialize(attributes) ⇒ HTTPResponse
constructor
Initializes the HTTP Response infromation.
-
#status_code ⇒ Integer
HTTP status code.
-
#title ⇒ String
HTTP title.
Constructor Details
#initialize(attributes) ⇒ HTTPResponse
Initializes the HTTP Response infromation
8 9 10 |
# File 'lib/censys/http_response.rb', line 8 def initialize(attributes) @attributes = attributes end |
Instance Method Details
#body ⇒ String
HTTP body
17 18 19 |
# File 'lib/censys/http_response.rb', line 17 def body @attributes.dig("get", "body") end |
#header ⇒ Hash
HTTP header
26 27 28 |
# File 'lib/censys/http_response.rb', line 26 def header @attributes.dig("get", "headers") end |
#status_code ⇒ Integer
HTTP status code
35 36 37 |
# File 'lib/censys/http_response.rb', line 35 def status_code @attributes.dig("get", "status_code") end |
#title ⇒ String
HTTP title
44 45 46 |
# File 'lib/censys/http_response.rb', line 44 def title @attributes.dig("get", "title") end |