Call success with nil if response data has length == 0.

Fixes exception when attempting to parse empty response data (i.e. HTTP Status Code 204 No Content).
This commit is contained in:
dstnbrkr 2011-08-10 14:08:07 -07:00
parent 065ee0226f
commit fa0297f1b8

View file

@ -61,6 +61,10 @@
if (failure) {
failure(error);
}
} else if ([data length] == 0) {
if (success) {
success(nil);
}
} else {
id JSON = nil;