Permalink
Browse files

Fixes #2110.

Missing docs onFailure event called also for invalid JSON strings. Also added missing See Also section in the Request.JSON.md.
  • Loading branch information...
1 parent e2b7f0b commit 9c5d965dbb50480a82fdb81364a20afe3b0275c7 @ibolmo committed Dec 3, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 Docs/Request/Request.JSON.md
View
16 Docs/Request/Request.JSON.md
@@ -47,6 +47,18 @@ Fired when the parsed JSON is not valid and the secure option is set.
1. text - (string) The response text.
2. error - (string) The error message.
+#### failure
+
+Fired when the request failed (error status code), or when JSON string could not be parsed.
+
+##### Signature:
+
+ onFailure(xhr)
+
+##### Arguments:
+
+xhr - (XMLHttpRequest) The transport instance.
+
### Returns:
* (*object*) A new Request.JSON instance.
@@ -59,3 +71,7 @@ Fired when the parsed JSON is not valid and the secure option is set.
alert(person.height); // alerts "170 cm".
alert(person.weight); // alerts "120 kg".
}}).get({'firstName': 'John', 'lastName': 'Doe'});
+
+### See Also:
+
+[Request](/core/Request/Request)

0 comments on commit 9c5d965

Please sign in to comment.