mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 02:10:59 +00:00
Add postData field
This commit is contained in:
parent
b14eb57db1
commit
7de48fc197
@ -93,7 +93,7 @@ def response(flow):
|
||||
response_body_decoded_size = len(flow.response.content)
|
||||
response_body_compression = response_body_decoded_size - response_body_size
|
||||
|
||||
HAR["log"]["entries"].append({
|
||||
entry = {
|
||||
"startedDateTime": started_date_time,
|
||||
"time": full_time,
|
||||
"request": {
|
||||
@ -123,7 +123,16 @@ def response(flow):
|
||||
},
|
||||
"cache": {},
|
||||
"timings": timings,
|
||||
})
|
||||
}
|
||||
|
||||
if flow.request.method == "POST":
|
||||
entry["request"]["postData"] = {
|
||||
"mimeType": flow.request.headers.get("Content-Type", "").split(";")[0],
|
||||
"text": flow.request.content,
|
||||
"params": name_value(flow.request.urlencoded_form)
|
||||
}
|
||||
|
||||
HAR["log"]["entries"].append(entry)
|
||||
|
||||
|
||||
def done():
|
||||
|
Loading…
Reference in New Issue
Block a user