class Selenium::WebDriver::DevTools::Response
Attributes
Public Class Methods
Source
# File lib/selenium/webdriver/devtools/response.rb, line 32 def self.from(id, encoded_body, params) new( id: id, code: params['responseStatusCode'], body: (Base64.strict_decode64(encoded_body) if encoded_body), headers: params.fetch('responseHeaders', []).each_with_object({}) do |header, hash| hash[header['name']] = header['value'] end ) end
Creates response from DevTools
message. @api private
Source
# File lib/selenium/webdriver/devtools/response.rb, line 43 def initialize(id:, code:, body:, headers:) @id = id @code = code @body = body @headers = headers end
Public Instance Methods
Source
# File lib/selenium/webdriver/devtools/response.rb, line 50 def ==(other) self.class == other.class && id == other.id && code == other.code && body == other.body && headers == other.headers end
Source
# File lib/selenium/webdriver/devtools/response.rb, line 58 def inspect %(#<#{self.class.name} @id="#{id}" @code="#{code}") end