Class: Selenium::WebDriver::BiDi::InterceptedRequest Private
- Inherits:
-
InterceptedItem
- Object
- InterceptedItem
- Selenium::WebDriver::BiDi::InterceptedRequest
- Defined in:
- lib/selenium/webdriver/bidi/network/intercepted_request.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
- #method ⇒ Object private
- #url ⇒ Object private
Attributes inherited from InterceptedItem
Instance Method Summary collapse
- #continue ⇒ Object private
- #cookies(cookies = {}) ⇒ Object private
- #cookies=(cookies = {}) ⇒ Object private
- #fail ⇒ Object private
- #headers(headers = {}) ⇒ Object private
- #headers=(headers = {}) ⇒ Object private
-
#initialize(network, request) ⇒ InterceptedRequest
constructor
private
A new instance of InterceptedRequest.
Methods inherited from InterceptedItem
Constructor Details
#initialize(network, request) ⇒ InterceptedRequest
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 InterceptedRequest.
34 35 36 37 38 39 40 41 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 34 def initialize(network, request) super @method = nil @url = 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.
32 33 34 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 32 def body @body end |
#method ⇒ 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.
31 32 33 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 31 def method @method end |
#url ⇒ 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.
31 32 33 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 31 def url @url 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.
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 43 def continue = &.as_json headers = @headers&.as_json network.continue_request( id: id, body: body, cookies: , headers: headers, method: method, url: url ) 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.
75 76 77 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 75 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.
79 80 81 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 79 def ( = {}) = Cookies.new() end |
#fail ⇒ 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.
56 57 58 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 56 def fail network.fail_request(id) 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.
71 72 73 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 71 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.
67 68 69 |
# File 'lib/selenium/webdriver/bidi/network/intercepted_request.rb', line 67 def headers=(headers = {}) @headers = Headers.new(headers) end |