title: How to get the HTTP response text from a HttpRequest.postFormData's catchError's _XMLHttpRequestProgressEvent?
body: <p>Given the following pseudo code:</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>import "dart:html";
  
  HttpRequest.postFormData(url, data).then((HttpRequest request) {
  
      ...
  
  }).catchError((error) {
  
      // How do I get the response text from here?
  
  });
  </code></pre>
  
  <p>If the web server replies with a <code>400 BAD REQUEST</code> then the <code>catchError</code> will be invoked. However, the error parameter is of the type <code>_XMLHttpRequestProgressEvent</code> which apparently doesn't exist in Dart's library.</p>
  
  <p>So, how do I get the response text from the <code>400 BAD REQUEST</code> response that was sent from the web server?</p>