class Censys::HTTPResponse

Public Class Methods

new(attributes) click to toggle source

Initializes the HTTP Response infromation

@param [Hash{String => Object}] attributes

# File lib/censys/http_response.rb, line 10
def initialize(attributes)
  @attributes = attributes
end

Public Instance Methods

body() click to toggle source

HTTP body

@return [String] body

# File lib/censys/http_response.rb, line 19
def body
  @attributes.dig("get", "body")
end
header() click to toggle source

HTTP header

@return [Hash] header

# File lib/censys/http_response.rb, line 28
def header
  @attributes.dig("get", "headers")
end
status_code() click to toggle source

HTTP status code

@return [Integer] status code

# File lib/censys/http_response.rb, line 37
def status_code
  @attributes.dig("get", "status_code")
end
title() click to toggle source

HTTP title

@return [String] title

# File lib/censys/http_response.rb, line 46
def title
  @attributes.dig("get", "title")
end