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
10 11 12 |
# File 'lib/censys/http_response.rb', line 10 def initialize(attributes) @attributes = attributes end |
Instance Method Details
#body ⇒ String
HTTP body
19 20 21 |
# File 'lib/censys/http_response.rb', line 19 def body @attributes.dig("get", "body") end |
#header ⇒ Hash
HTTP header
28 29 30 |
# File 'lib/censys/http_response.rb', line 28 def header @attributes.dig("get", "headers") end |
#status_code ⇒ Integer
HTTP status code
37 38 39 |
# File 'lib/censys/http_response.rb', line 37 def status_code @attributes.dig("get", "status_code") end |
#title ⇒ String
HTTP title
46 47 48 |
# File 'lib/censys/http_response.rb', line 46 def title @attributes.dig("get", "title") end |