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
I am attempting to connect to a WebSocket API delivered via the AWS API gateway, currently, I am able to establish a successful connection via PostMan and Python scripts ran from my local terminal, but when I attempt a connection with dart I keep getting this error of WebSocketException: Connection was not upgraded to websocket
My code
main() async {
final wsUrl = Uri.parse('wss://xxxxxxxxxx.execute-api.eu-west-1.amazonaws.com/qa');
final channel = IOWebSocketChannel.connect(wsUrl);
// await channel.ready;
channel.stream.listen((message) {
print(message);
channel.sink.add('received!');
});
}
I am attempting to connect to a WebSocket API delivered via the AWS API gateway, currently, I am able to establish a successful connection via PostMan and Python scripts ran from my local terminal, but when I attempt a connection with dart I keep getting this error of
WebSocketException: Connection was not upgraded to websocket
My code
Error:
Any help on this will be much appreciated
The text was updated successfully, but these errors were encountered: