Class: Selenium::WebDriver::BiDi::InterceptedResponse Private
- Inherits:
-
InterceptedItem
- Object
- InterceptedItem
- Selenium::WebDriver::BiDi::InterceptedResponse
- Defined in:
- lib/selenium/webdriver/bidi/network/intercepted_response.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #body ⇒ Object private
- #reason ⇒ Object private
- #status ⇒ Object private
Attributes inherited from InterceptedItem
Instance Method Summary collapse
- #continue ⇒ Object private
- #cookies(cookies = {}) ⇒ Object private
- #cookies=(cookies = {}) ⇒ Object private
- #credentials(username: nil, password: nil) ⇒ Object private
- #headers(headers = {}) ⇒ Object private
- #headers=(*headers) ⇒ Object private
-
#initialize(network, request) ⇒ InterceptedResponse
constructor
private
A new instance of InterceptedResponse.
- #provide_response ⇒ Object private
Methods inherited from InterceptedItem
Constructor Details
#initialize(network, request) ⇒ InterceptedResponse
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of InterceptedResponse.
35 36 37 38 39 40 41 42 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 35 def initialize(network, request) super @reason = nil @status = nil @body = nil @headers = nil = nil end |
Instance Attribute Details
#body ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 33 def body @body end |
#reason ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 32 def reason @reason end |
#status ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 32 def status @status end |
Instance Method Details
#continue ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 44 def continue = &.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
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
82 83 84 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 82 def ( = {}) ||= Cookies.new() end |
#cookies=(cookies = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
86 87 88 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 86 def ( = {}) ||= Cookies.new() end |
#credentials(username: nil, password: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
70 71 72 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 70 def credentials(username: nil, password: nil) @credentials ||= Credentials.new(username: username, password: password) end |
#headers(headers = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
74 75 76 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 74 def headers(headers = {}) @headers ||= Headers.new(headers) end |
#headers=(*headers) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
78 79 80 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 78 def headers=(*headers) @headers = Headers.new(headers) end |
#provide_response ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_response.rb', line 57 def provide_response = &.as_json headers = @headers&.as_json network.provide_response( id: id, cookies: , headers: headers, body: body, reason: reason, status: status ) end |