mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-04 04:37:15 +00:00
Require requests > 1.0.4
This changes the API slightly, since json is now a method, not a property.
This commit is contained in:
parent
781592d6c0
commit
b07ab253b7
@ -30,7 +30,7 @@ class Daemon:
|
|||||||
Return some basic info about the remote daemon.
|
Return some basic info about the remote daemon.
|
||||||
"""
|
"""
|
||||||
resp = requests.get("%s/api/info"%self.urlbase, verify=False)
|
resp = requests.get("%s/api/info"%self.urlbase, verify=False)
|
||||||
return resp.json
|
return resp.json()
|
||||||
|
|
||||||
def last_log(self):
|
def last_log(self):
|
||||||
"""
|
"""
|
||||||
@ -47,7 +47,7 @@ class Daemon:
|
|||||||
Return the log buffer as a list of dictionaries.
|
Return the log buffer as a list of dictionaries.
|
||||||
"""
|
"""
|
||||||
resp = requests.get("%s/api/log"%self.urlbase, verify=False)
|
resp = requests.get("%s/api/log"%self.urlbase, verify=False)
|
||||||
return resp.json["log"]
|
return resp.json()["log"]
|
||||||
|
|
||||||
def clear_log(self):
|
def clear_log(self):
|
||||||
"""
|
"""
|
||||||
|
2
setup.py
2
setup.py
@ -89,5 +89,5 @@ setup(
|
|||||||
"Topic :: Software Development :: Testing :: Traffic Generation",
|
"Topic :: Software Development :: Testing :: Traffic Generation",
|
||||||
"Topic :: Internet :: WWW/HTTP",
|
"Topic :: Internet :: WWW/HTTP",
|
||||||
],
|
],
|
||||||
install_requires=['netlib>=0.2.2', "requests>=0.13", "flask"],
|
install_requires=['netlib>=0.2.2', "requests>=1.0.4", "flask"],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user