From: Marcelo Trylesinski Date: Mon, 9 May 2022 18:44:42 +0000 (+0200) Subject: Document unsuported `params` on `TestClient.websocket_connect` (#1630) X-Git-Tag: 0.20.1~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7a92ee4cd43b6d7acf4e2fdedb20fe0e86f9620;p=thirdparty%2Fstarlette.git Document unsuported `params` on `TestClient.websocket_connect` (#1630) --- diff --git a/docs/testclient.md b/docs/testclient.md index d8d4b256..a214715f 100644 --- a/docs/testclient.md +++ b/docs/testclient.md @@ -97,6 +97,15 @@ May raise `starlette.websockets.WebSocketDisconnect` if the application does not `websocket_connect()` must be used as a context manager (in a `with` block). +!!! note + The `params` argument is not supported by `websocket_connect`. If you need to pass query arguments, hard code it + directly in the URL. + + ```python + with client.websocket_connect('/path?foo=bar') as websocket: + ... + ``` + #### Sending data * `.send_text(data)` - Send the given text to the application.