Skip to content

Commit

Permalink
Merge pull request #169 from andrewimm/master
Browse files Browse the repository at this point in the history
Return the appropriate status code from XHR
  • Loading branch information
tadeuzagallo committed Mar 19, 2015
2 parents ca9f1e5 + b66424e commit c656cd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/Network/RCTDataManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ - (void)executeQuery:(NSString *)queryType
} else {
encoding = NSUTF8StringEncoding;
}
int responseCode = (int)[((NSHTTPURLResponse *)response) statusCode];
NSString *returnData = [[NSString alloc] initWithData:data encoding:encoding];
responseJSON = @{@"status": @200, @"responseText": returnData};
responseJSON = @{@"status": @(responseCode), @"responseText": returnData};
} else {
responseJSON = @{@"status": @0, @"responseText": [connectionError localizedDescription]};
}
Expand Down

0 comments on commit c656cd9

Please sign in to comment.