AFJSONRequestOperation.m:
-Fixing an issue where all JSON parse errors are ignored. The operation.error was always being set to nil no what responseJSON set the error property to. AFXMLRequestOperation.m: -Making sure the success callback for the iOS case is run on the main thread
This commit is contained in:
parent
3040aafee9
commit
436fbe82d1
2 changed files with 3 additions and 3 deletions
|
|
@ -65,9 +65,7 @@ static dispatch_queue_t json_request_operation_processing_queue() {
|
|||
}
|
||||
} else {
|
||||
dispatch_async(json_request_operation_processing_queue(), ^(void) {
|
||||
NSError *error = nil;
|
||||
id JSON = operation.responseJSON;
|
||||
operation.error = error;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
||||
if (operation.error) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,9 @@ static dispatch_queue_t xml_request_operation_processing_queue() {
|
|||
} else {
|
||||
NSXMLParser *XMLParser = operation.responseXMLParser;
|
||||
if (success) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
||||
success(operation.request, operation.response, XMLParser);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue