From 599834b0e1c41d934dce30b6393926635f72b78e Mon Sep 17 00:00:00 2001 From: ciscorn Date: Tue, 17 Jul 2018 04:20:26 +0900 Subject: [PATCH] Add subprotocols param to add_websocket_route (#1261) --- sanic/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sanic/app.py b/sanic/app.py index ca50edc1..7af82111 100644 --- a/sanic/app.py +++ b/sanic/app.py @@ -315,13 +315,13 @@ class Sanic: return response def add_websocket_route(self, handler, uri, host=None, - strict_slashes=None, name=None): + strict_slashes=None, subprotocols=None, name=None): """A helper method to register a function as a websocket route.""" if strict_slashes is None: strict_slashes = self.strict_slashes return self.websocket(uri, host=host, strict_slashes=strict_slashes, - name=name)(handler) + subprotocols=subprotocols, name=name)(handler) def enable_websocket(self, enable=True): """Enable or disable the support for websocket.