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:
Nick Lockwood
2015-06-01 08:28:31 -07:00
parent b03446e27e
commit a2db4a4a5b
3 changed files with 20 additions and 22 deletions

View File

@@ -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)
);
}