requestCrossOrigin method

  1. @Experimental()
Future<String> requestCrossOrigin(String url, { String method, String sendData })

Makes a cross-origin request to the specified URL.

This API provides a subset of request which works on IE9. If IE9 cross-origin support is not required then request should be used instead.

Source

@Experimental()
static Future<String> requestCrossOrigin(String url,
    {String method, String sendData}) {
  if (supportsCrossOrigin) {
    return request(url, method: method, sendData: sendData).then((xhr) {
      return xhr.responseText;
    });
  }
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/HttpRequest/requestCrossOrigin.html