Browse files

Merge pull request #9 from dstnbrkr/master

Handle responses with no content (ex. http status code 204)
  • Loading branch information...
2 parents 4d5ae42 + fa0297f commit d22ed88d58149176e9d36a76ccc695ff0ef08e49 @mattt mattt committed Aug 14, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 AFNetworking/AFJSONRequestOperation.m
View
4 AFNetworking/AFJSONRequestOperation.m
@@ -78,6 +78,10 @@ + (id)operationWithRequest:(NSURLRequest *)urlRequest
if (failure) {
failure(request, response, error);
}
+ } else if ([data length] == 0) {
+ if (success) {
+ success(nil);
+ }
} else {
dispatch_async(json_request_operation_processing_queue(), ^(void) {
id JSON = nil;

0 comments on commit d22ed88

Please sign in to comment.