mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
renamed add_request to create_request and added a tiny docstring
This commit is contained in:
parent
1df78f75c5
commit
493cecfaf2
@ -267,7 +267,7 @@ class FlowListBox(urwid.ListBox):
|
|||||||
def new_request(self, url, method):
|
def new_request(self, url, method):
|
||||||
try:
|
try:
|
||||||
scheme, host, port, path = http.parse_url(url)
|
scheme, host, port, path = http.parse_url(url)
|
||||||
f = self.master.add_request(method, scheme, host, port, path)
|
f = self.master.create_request(method, scheme, host, port, path)
|
||||||
self.master.view_flow(f)
|
self.master.view_flow(f)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.master.statusbar.message("Invalid Url")
|
self.master.statusbar.message("Invalid Url")
|
||||||
|
@ -763,7 +763,13 @@ class FlowMaster(controller.Master):
|
|||||||
def duplicate_flow(self, f):
|
def duplicate_flow(self, f):
|
||||||
return self.load_flow(f.copy())
|
return self.load_flow(f.copy())
|
||||||
|
|
||||||
def add_request(self, method, scheme, host, port, path):
|
def create_request(self, method, scheme, host, port, path):
|
||||||
|
"""
|
||||||
|
Creates a new request from params and add it to flow list.
|
||||||
|
created request is empty (except for method and url) but is able
|
||||||
|
to be replayed
|
||||||
|
|
||||||
|
"""
|
||||||
f = http.HTTPFlow(None,None);
|
f = http.HTTPFlow(None,None);
|
||||||
headers = ODictCaseless()
|
headers = ODictCaseless()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user