Class: Selenium::WebDriver::BiDi::InterceptedRequest Private

Inherits:
InterceptedItem show all
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

Attributes inherited from InterceptedItem

#network, #request

Instance Method Summary collapse

Methods inherited from InterceptedItem

#id

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
  @cookies = nil
end

Instance Attribute Details

#bodyObject

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

#methodObject

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

#urlObject

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

#continueObject

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
  cookies = @cookies&.as_json
  headers = @headers&.as_json
  network.continue_request(
    id: id,
    body: body,
    cookies: 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(cookies = {})
  @cookies ||= Cookies.new(cookies)
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=(cookies = {})
  @cookies = Cookies.new(cookies)
end

#failObject

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