mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +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.
|
||||
"""
|
||||
resp = requests.get("%s/api/info"%self.urlbase, verify=False)
|
||||
return resp.json
|
||||
return resp.json()
|
||||
|
||||
def last_log(self):
|
||||
"""
|
||||
@ -47,7 +47,7 @@ class Daemon:
|
||||
Return the log buffer as a list of dictionaries.
|
||||
"""
|
||||
resp = requests.get("%s/api/log"%self.urlbase, verify=False)
|
||||
return resp.json["log"]
|
||||
return resp.json()["log"]
|
||||
|
||||
def clear_log(self):
|
||||
"""
|
||||
|
2
pathod
2
pathod
@ -166,7 +166,7 @@ if __name__ == "__main__":
|
||||
|
||||
|
||||
group = parser.add_argument_group(
|
||||
'Controlling Logging',
|
||||
'Controlling Logging',
|
||||
"""
|
||||
Some of these options expand generated values for logging - if
|
||||
you're generating large data, use them with caution.
|
||||
|
Loading…
Reference in New Issue
Block a user