aboutsummaryrefslogtreecommitdiffstats
path: root/doc-src/scripting
diff options
context:
space:
mode:
authorBrad Peabody <bradpeabody@gmail.com>2014-07-24 19:11:16 -0700
committerBrad Peabody <bradpeabody@gmail.com>2014-07-24 19:11:16 -0700
commita1fa34e61c4414898fd489c40d543ffe638c3d22 (patch)
tree44c583ac48990671b444e20054a5845e73dc5041 /doc-src/scripting
parent5bb4e37dfda567adb8ae2bc1e98552dd6f87e6fe (diff)
downloadmitmproxy-a1fa34e61c4414898fd489c40d543ffe638c3d22.tar.gz
mitmproxy-a1fa34e61c4414898fd489c40d543ffe638c3d22.tar.bz2
mitmproxy-a1fa34e61c4414898fd489c40d543ffe638c3d22.zip
response streaming doc
Diffstat (limited to 'doc-src/scripting')
-rw-r--r--doc-src/scripting/inlinescripts.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc-src/scripting/inlinescripts.html b/doc-src/scripting/inlinescripts.html
index 32a98e99..65090cfb 100644
--- a/doc-src/scripting/inlinescripts.html
+++ b/doc-src/scripting/inlinescripts.html
@@ -46,12 +46,20 @@ a connection can correspond to multiple HTTP requests.
Called when a client request has been received. The __Flow__ object is
guaranteed to have a non-None __request__ attribute.
+### responseheaders(ScriptContext, Flow)
+
+Called when the headers of a server response have been received.
+This will always be called before the response hook.
+The __Flow__ object is guaranteed to have non-None __request__ and
+__response__ attributes. __response.content__ will not be valid,
+as the response body has not been read yet.
### response(ScriptContext, Flow)
Called when a server response has been received. The __Flow__ object is
guaranteed to have non-None __request__ and __response__ attributes.
-
+Note that if response streaming is enabled for this response,
+__response.content__ will not contain the response body.
### error(ScriptContext, Flow)