class Selenium::WebDriver::DevTools::Response
Attributes
body[RW]
code[RW]
headers[RW]
id[R]
Public Class Methods
from(id, encoded_body, params)
click to toggle source
Creates response from DevTools
message. @api private
# File lib/selenium/webdriver/devtools/response.rb, line 33 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
new(id:, code:, body:, headers:)
click to toggle source
# File lib/selenium/webdriver/devtools/response.rb, line 44 def initialize(id:, code:, body:, headers:) @id = id @code = code @body = body @headers = headers end
Public Instance Methods
==(other)
click to toggle source
# File lib/selenium/webdriver/devtools/response.rb, line 51 def ==(other) self.class == other.class && id == other.id && code == other.code && body == other.body && headers == other.headers end
inspect()
click to toggle source
# File lib/selenium/webdriver/devtools/response.rb, line 59 def inspect %(#<#{self.class.name} @id="#{id}" @code="#{code}") end