From 4f1fb43dcce262b3ade52d93f218538c1a64e4fd Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Fri, 12 Aug 2016 01:31:33 +0530 Subject: Use postData field in PUT, PATCH requests too The HAR spec isn't really clear on whether this should be the case, but Google Chrome does this, so I think we should too. --- examples/har_dump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/har_dump.py') diff --git a/examples/har_dump.py b/examples/har_dump.py index 4ab6b5a9..803a3249 100644 --- a/examples/har_dump.py +++ b/examples/har_dump.py @@ -135,7 +135,7 @@ def response(flow): else: entry["response"]["content"]["text"] = flow.response.content - if flow.request.method == "POST": + if flow.request.method in ["POST", "PUT", "PATCH"]: entry["request"]["postData"] = { "mimeType": flow.request.headers.get("Content-Type", "").split(";")[0], "text": flow.request.content, -- cgit v1.2.3