JSONPRequest class

Sends data via JSONP. Data is a key-value map. Its values are JSON-encoded and then passed through base64. Finally, keys and encoded values are appended to the query string. The class itself does not guarantee raising errors on failures, as it's not possible to support such feature on all browsers. Instead, JSONP endpoint should call back in a way that's easy to distinguish from browser calls, for example by passing a second argument to the receiver.

Annotations
  • @JS()

Constructors

JSONPRequest(String url, dynamic data)
factory

Properties

data ↔ dynamic
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
request ScriptRequest
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
getter/setter pair

Methods

cleanup() → dynamic
Cleans up the DOM remains of the JSONP request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(ScriptReceiver receiver) → dynamic
Sends the actual JSONP request.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited