I finally got around to adding the onDataComplete listener. I updated
the examples page:
To get notified of all data when the response data has been received,
use the HttpDataListener? with HttpDataListener?#onDataComplete.
var client:HttpClient = new HttpClient();
var listener:HttpDataListener = new HttpDataListener();
listener.onDataComplete = function(event:HttpResponseEvent,
data:ByteArray):void {
// Notified with response content
};
var uri:URI = new URI("
http://www.nytimes.com");
client.get(uri, listener);
As a side effect listeners can be added on a per-request basis, which
makes more sense in general.. The HttpClient#listener was a default
that is nice to have, although makes things a bit more complex.