Skip to content

Commit

Permalink
Fixes mootools#2110.
Browse files Browse the repository at this point in the history
Missing docs onFailure event called also for invalid JSON strings. Also added missing See Also section in the Request.JSON.md.
  • Loading branch information
ibolmo committed Dec 3, 2011
1 parent e2b7f0b commit 9c5d965
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Docs/Request/Request.JSON.md
Expand Up @@ -47,6 +47,18 @@ Fired when the parsed JSON is not valid and the secure option is set.
1. text - (string) The response text. 1. text - (string) The response text.
2. error - (string) The error message. 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: ### Returns:


* (*object*) A new Request.JSON instance. * (*object*) A new Request.JSON instance.
Expand All @@ -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.height); // alerts "170 cm".
alert(person.weight); // alerts "120 kg". alert(person.weight); // alerts "120 kg".
}}).get({'firstName': 'John', 'lastName': 'Doe'}); }}).get({'firstName': 'John', 'lastName': 'Doe'});

### See Also:

[Request](/core/Request/Request)

0 comments on commit 9c5d965

Please sign in to comment.