Skip to content

Commit

Permalink
Merge pull request AFNetworking#9 from dstnbrkr/master
Browse files Browse the repository at this point in the history
Handle responses with no content (ex. http status code 204)
  • Loading branch information
Mattt Thompson committed Aug 15, 2011
2 parents 4d5ae42 + fa0297f commit d22ed88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions AFNetworking/AFJSONRequestOperation.m
Expand Up @@ -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;
Expand Down

0 comments on commit d22ed88

Please sign in to comment.