Class: Selenium::WebDriver::BiDi::InterceptedResponse
- Inherits:
 - 
      InterceptedItem
      
        
- Object
 - InterceptedItem
 - Selenium::WebDriver::BiDi::InterceptedResponse
 
 
- Defined in:
 - lib/selenium/webdriver/bidi/network/intercepted_response.rb
 
Instance Attribute Summary collapse
- 
  
    
      #body  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute body.
 - 
  
    
      #reason  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute reason.
 - 
  
    
      #status  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute status.
 
Attributes inherited from InterceptedItem
Instance Method Summary collapse
- #continue ⇒ Object
 - #cookies(cookies = {}) ⇒ Object
 - #cookies=(cookies = {}) ⇒ Object
 - #credentials(username: nil, password: nil) ⇒ Object
 - #headers(headers = {}) ⇒ Object
 - #headers=(*headers) ⇒ Object
 - 
  
    
      #initialize(network, request)  ⇒ InterceptedResponse 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of InterceptedResponse.
 - #provide_response ⇒ Object
 
Methods inherited from InterceptedItem
Constructor Details
#initialize(network, request) ⇒ InterceptedResponse
Returns a new instance of InterceptedResponse.
      31 32 33 34 35 36 37 38  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 31 def initialize(network, request) super @reason = nil @status = nil @body = nil @headers = nil @cookies = nil end  | 
  
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
      29 30 31  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 29 def body @body end  | 
  
#reason ⇒ Object
Returns the value of attribute reason.
      28 29 30  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 28 def reason @reason end  | 
  
#status ⇒ Object
Returns the value of attribute status.
      28 29 30  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 28 def status @status end  | 
  
Instance Method Details
#continue ⇒ Object
      40 41 42 43 44 45 46 47 48 49 50 51  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 40 def continue = @cookies&.as_json headers = @headers&.as_json network.continue_response( id: id, cookies: , headers: headers, credentials: credentials.as_json, reason: reason, status: status ) end  | 
  
#cookies(cookies = {}) ⇒ Object
      78 79 80  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 78 def ( = {}) @cookies ||= Cookies.new() end  | 
  
#cookies=(cookies = {}) ⇒ Object
      82 83 84  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 82 def ( = {}) @cookies ||= Cookies.new() end  | 
  
#credentials(username: nil, password: nil) ⇒ Object
      66 67 68  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 66 def credentials(username: nil, password: nil) @credentials ||= Credentials.new(username: username, password: password) end  | 
  
#headers(headers = {}) ⇒ Object
      70 71 72  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 70 def headers(headers = {}) @headers ||= Headers.new(headers) end  | 
  
#headers=(*headers) ⇒ Object
      74 75 76  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 74 def headers=(*headers) @headers = Headers.new(headers) end  | 
  
#provide_response ⇒ Object
      53 54 55 56 57 58 59 60 61 62 63 64  | 
    
      # File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 53 def provide_response = @cookies&.as_json headers = @headers&.as_json network.provide_response( id: id, cookies: , headers: headers, body: body, reason: reason, status: status ) end  |