Merge pull request #9 from dstnbrkr/master
Handle responses with no content (ex. http status code 204)
This commit is contained in:
commit
d22ed88d58
1 changed files with 4 additions and 0 deletions
|
|
@ -78,6 +78,10 @@ static dispatch_queue_t json_request_operation_processing_queue() {
|
||||||
if (failure) {
|
if (failure) {
|
||||||
failure(request, response, error);
|
failure(request, response, error);
|
||||||
}
|
}
|
||||||
|
} else if ([data length] == 0) {
|
||||||
|
if (success) {
|
||||||
|
success(nil);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dispatch_async(json_request_operation_processing_queue(), ^(void) {
|
dispatch_async(json_request_operation_processing_queue(), ^(void) {
|
||||||
id JSON = nil;
|
id JSON = nil;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue