Simon Krajewski 12 years ago
parent
commit
477d2fa68f
1 changed files with 21 additions and 0 deletions
  1. 21 0
      std/haxe/Http.hx

+ 21 - 0
std/haxe/Http.hx

@@ -680,12 +680,33 @@ class Http {
 
 #end
 
+	/**
+		This method is called upon a successful request, with [data] containing
+		the result String.
+		
+		The intended usage is to bind it to a custom function:
+			httpInstance.onData = function(data) { // handle result }
+	**/
 	public dynamic function onData( data : String ) {
 	}
 
+	/**
+		This method is called upon a request error, with [msg] containing the
+		error description.
+		
+		The intended usage is to bind it to a custom function:
+			httpInstance.onError = function(msg) { // handle error }
+	**/
 	public dynamic function onError( msg : String ) {
 	}
 
+	/**
+		This method is called upon a Http status change, with [status] being the
+		new status.
+		
+		The intended usage is to bind it to a custom function:
+			httpInstance.onStatus = function(status) { // handle status }
+	**/
 	public dynamic function onStatus( status : Int ) {
 	}