Given the following pseudo code:
import "dart:html"; HttpRequest.postFormData(url, data).then((HttpRequest request) { ... }).catchError((error) { // How do I get the response text from here? });
If the web server responds with 400 BAD REQUEST , then catchError will be catchError . However, the error parameter is of type _XMLHttpRequestProgressEvent , which apparently does not exist in the Dart library.
So, how to get the response text from the 400 BAD REQUEST response sent from the web server?
source share