How to access POST data sent from a browser to Rikulo Steam Server How to access POST data sent from a browser to Rikulo Steam Server dart dart

How to access POST data sent from a browser to Rikulo Steam Server


POST is not supported well in Dart SDK, but Dart team planned to enhance it. Please stargaze it here: issue 2488.

On the other hand, since what you handle is JSON, you can listen to HttpRequest (I'm assuming the latest SDK) and convert List to String and then to JSON. Rikulo Commons provides a utility to simplify the job as follows:

import "package:rikulo_commons/io.dart";IOUtil.readAsJson(request, onError: connect.error).then((jsonValue) {   //handle it here});