diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-08-21 11:29:27 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-09-01 09:57:36 +0200 |
commit | 823d8a5da89755d9f9d85f16434ddad26fd0ac6d (patch) | |
tree | 6db24aabd42b359a77262a39f8b5ba09a8902966 /docs/scripting | |
parent | cd3d30633fae965044d5f320b5544dfbd039693f (diff) | |
download | mitmproxy-823d8a5da89755d9f9d85f16434ddad26fd0ac6d.tar.gz mitmproxy-823d8a5da89755d9f9d85f16434ddad26fd0ac6d.tar.bz2 mitmproxy-823d8a5da89755d9f9d85f16434ddad26fd0ac6d.zip |
add docs for websocket_handshake hook
Diffstat (limited to 'docs/scripting')
-rw-r--r-- | docs/scripting/inlinescripts.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/scripting/inlinescripts.rst b/docs/scripting/inlinescripts.rst index bc9d5ff5..e1c01b17 100644 --- a/docs/scripting/inlinescripts.rst +++ b/docs/scripting/inlinescripts.rst @@ -126,6 +126,18 @@ HTTP Events :param HTTPFlow flow: The flow containing the error. It is guaranteed to have non-None ``error`` attribute. +WebSockets Events +^^^^^^^^^^^^^^^^^ + +.. py:function:: websockets_handshake(context, flow) + + Called when a client wants to establish a WebSockets connection. + The WebSockets-specific headers can be manipulated to manipulate the handshake. + The ``flow`` object is guaranteed to have a non-None ``request`` attribute. + + :param HTTPFlow flow: The flow containing the request which has been received. + The object is guaranteed to have a non-None ``request`` attribute. + TCP Events ^^^^^^^^^^ |