@@ -13,7 +13,7 @@ def __init__(self, url, params=None, options=None):
13
13
Initialises a new Client object
14
14
15
15
16
- :param url: This is where the BrowserMob Proxy lives
16
+ :param url: This is where the BrowserUp Proxy lives
17
17
:param params: URL query (for example httpProxy and httpsProxy vars)
18
18
:param options: Dictionary that can contain the port of an existing
19
19
proxy to use (for example 'existing_proxy_port_to_use')
@@ -33,7 +33,7 @@ def __init__(self, url, params=None, options=None):
33
33
try :
34
34
jcontent = json .loads (content )
35
35
except Exception as e :
36
- raise Exception ("Could not read Browsermob -Proxy json\n "
36
+ raise Exception ("Could not read Browserup -Proxy json\n "
37
37
"Another server running on this port?\n %s..." % content [:512 ])
38
38
self .port = jcontent ['port' ]
39
39
url_parts = self .host .split (":" )
@@ -68,7 +68,7 @@ def webdriver_proxy(self):
68
68
def add_to_capabilities (self , capabilities ):
69
69
"""
70
70
Adds an 'proxy' entry to a desired capabilities dictionary with the
71
- BrowserMob proxy information
71
+ BrowserUp proxy information
72
72
73
73
74
74
:param capabilities: The Desired capabilities object from Selenium WebDriver
@@ -82,7 +82,7 @@ def add_to_capabilities(self, capabilities):
82
82
def add_to_webdriver_capabilities (self , capabilities ):
83
83
self .add_to_capabilities (capabilities )
84
84
85
- # browsermob proxy api
85
+ # browserup proxy api
86
86
@property
87
87
def proxy_ports (self ):
88
88
"""
@@ -108,7 +108,7 @@ def new_har(self, ref=None, options=None, title=None):
108
108
This sets a new HAR to be recorded
109
109
110
110
:param str ref: A reference for the HAR. Defaults to None
111
- :param dict options: A dictionary that will be passed to BrowserMob
111
+ :param dict options: A dictionary that will be passed to BrowserUp
112
112
Proxy with specific keywords. Keywords are:
113
113
114
114
- captureHeaders: Boolean, capture headers
@@ -200,8 +200,8 @@ def response_interceptor(self, js):
200
200
"""
201
201
Executes the java/js code against each response
202
202
`HttpRequest request <https://netty.io/4.1/api/io/netty/handler/codec/http/HttpRequest.html>`_,
203
- `HttpMessageContents contents <https://raw.githubusercontent.com/lightbody/browsermob -proxy/master/browsermob- core/src/main/java/net/lightbody/bmp /util/HttpMessageContents.java>`_,
204
- `HttpMessageInfo messageInfo <https://raw.githubusercontent.com/lightbody/browsermob -proxy/master/browsermob- core/src/main/java/net/lightbody/bmp /util/HttpMessageInfo.java>`_
203
+ `HttpMessageContents contents <https://raw.githubusercontent.com/browserup/browserup -proxy/master/browserup-proxy- core/src/main/java/com/browserup/bup /util/HttpMessageContents.java>`_,
204
+ `HttpMessageInfo messageInfo <https://raw.githubusercontent.com/browserup/browserup -proxy/master/browserup-proxy- core/src/main/java/com/browserup/bup /util/HttpMessageInfo.java>`_
205
205
are available objects to interact with.
206
206
:param str js: the js/java code to execute
207
207
"""
@@ -214,8 +214,8 @@ def request_interceptor(self, js):
214
214
"""
215
215
Executes the java/js code against each response
216
216
`HttpRequest request <https://netty.io/4.1/api/io/netty/handler/codec/http/HttpRequest.html>`_,
217
- `HttpMessageContents contents <https://raw.githubusercontent.com/lightbody/browsermob -proxy/master/browsermob- core/src/main/java/net/lightbody/bmp /util/HttpMessageContents.java>`_,
218
- `HttpMessageInfo messageInfo <https://raw.githubusercontent.com/lightbody/browsermob -proxy/master/browsermob- core/src/main/java/net/lightbody/bmp /util/HttpMessageInfo.java>`_
217
+ `HttpMessageContents contents <https://raw.githubusercontent.com/browserup/browserup -proxy/master/browserup-proxy- core/src/main/java/com/browserup/bup /util/HttpMessageContents.java>`_,
218
+ `HttpMessageInfo messageInfo <https://raw.githubusercontent.com/browserup/browserup -proxy/master/browserup-proxy- core/src/main/java/com/browserup/bup /util/HttpMessageInfo.java>`_
219
219
are available objects to interact with.
220
220
:param str js: the js/java code to execute
221
221
"""
@@ -293,7 +293,7 @@ def remap_hosts(self, address=None, ip_address=None, hostmap=None):
293
293
:param str address: url that you wish to remap
294
294
:param str ip_address: IP Address that will handle all traffic for
295
295
the address passed in
296
- :param ** hostmap: Other hosts to be added as keyword arguments
296
+ :param hostmap: Other hosts to be added as keyword arguments
297
297
"""
298
298
hostmap = hostmap if hostmap is not None else {}
299
299
if (address is not None and ip_address is not None ):
@@ -347,13 +347,3 @@ def clear_all_rewrite_url_rules(self):
347
347
348
348
r = requests .delete ('%s/proxy/%s/rewrite' % (self .host , self .port ))
349
349
return r .status_code
350
-
351
- def retry (self , retry_count ):
352
- """
353
- Retries. No idea what its used for, but its in the API...
354
-
355
- :param int retry_count: the number of retries
356
- """
357
- r = requests .put ('%s/proxy/%s/retry' % (self .host , self .port ),
358
- {'retrycount' : retry_count })
359
- return r .status_code
0 commit comments