mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-25 12:55:41 +08:00
Removed redundant JSON encode/decode from RCTDataManager
Summary: @public For some reason we were manually JSON-encoding the RCTDataManager responses, and then decoding them again on the JS side. Since all data sent over the bridge is JSON-encoded anyway, this is pretty pointless. Test Plan: * Test Movies app in OSS, which uses RCTDataManager * Test any code that uses RKHTTPQueryGenericExecutor to make network requests (e.g. Groups) * Test the Groups photo upload feature, which uses RKHTTPQueryWithImageUploadExecutor
This commit is contained in:
@@ -30,10 +30,7 @@ class XMLHttpRequest extends XMLHttpRequestBase {
|
||||
},
|
||||
// TODO: Do we need this? is it used anywhere?
|
||||
'h' + crc32(method + '|' + url + '|' + data),
|
||||
(result) => {
|
||||
result = JSON.parse(result);
|
||||
this.callback(result.status, result.responseHeaders, result.responseText);
|
||||
}
|
||||
this.callback.bind(this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user