dart, shelf_route: What is route name in the `GET` method that work with the request that using multi parameter?

Issue My flutter app sends the request to this API with the GET method and uses the queryParameters like this: Map<String, dynamic> parameters = {‘id’: null}; parameters.updateAll((key, value) => Uri.encodeComponent(jsonEncode(value))); String url= ‘http://localhost:8080/test; final Uri uri = Uri.parse(url).replace(queryParameters: parameters); final

Continue reading

How can I use shelf_web_socket to listen for http and ws requests on the same port

Issue https://pub.dartlang.org/packages/shelf_web_socket shows this example import ‘package:shelf/shelf_io.dart’ as shelf_io; import ‘package:shelf_web_socket/shelf_web_socket.dart’; void main() { var handler = webSocketHandler((webSocket) { webSocket.listen((message) { webSocket.add(“echo $message”); }); }); shelf_io.serve(handler, ‘localhost’, 8080).then((server) { print(‘Serving at ws://${server.address.host}:${server.port}’); }); } I would like to know how

Continue reading