You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: none of the overloads of `get` are callable using a `const` object
Error: mutable method `vibe.http.server.HTTPServerRequest.query` is not callable using a `const` object
The reason for this is that the WebSocket.request() method returns a const value, which unfortunately does not work for DictionaryList.get. A const version of DictionaryList.get should be added, which is needed due to returning a const HTTPServerRequest.
The text was updated successfully, but these errors were encountered:
The problem here is actually the query property itself that is not const. It used to be a normal field in the early days, but now parses the query string lazily for performance reasons and thus cannot be const. It seems like we need to change it from const(HTTPServerRequest) request() const to inout(HTTPServerRequest) request() inout and just document that the returned request may not be modified.
When attaching a handler to a WebSocket like so:
The handler itself is unable to access the query-string parameters using the get method.
This code results in the error:
The reason for this is that the
WebSocket.request()
method returns a const value, which unfortunately does not work forDictionaryList.get
. A const version ofDictionaryList.get
should be added, which is needed due to returning aconst HTTPServerRequest
.The text was updated successfully, but these errors were encountered: