We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91d1e56 commit bb8f0d0Copy full SHA for bb8f0d0
browsermobproxy/client.py
@@ -18,6 +18,18 @@ def __init__(self, url):
18
url_parts = self.host.split(":")
19
self.proxy = url_parts[0] + ":" + url_parts[1] + ":" + str(self.port)
20
21
+ def headers(self, headers):
22
+ """
23
+ This sets the headers that will set by the proxy on all requests
24
+ :Args:
25
+ - headers: this is a dictionary of the headers to be set
26
27
+ if not isinstance(headers, dict):
28
+ raise TypeError("headers needs to be dictionary")
29
+
30
+ requests.post('%s/proxy/%s/har' % (self.host, self.port),
31
+ json.dumps(headers))
32
33
def new_har(self, ref=None):
34
"""
35
This sets a new HAR to be recorded
0 commit comments