rpc.js: removed Buffer.from

There hasn't Buffer Object in react native environment.
This commit is contained in:
M 2017-02-10 18:28:03 +13:00 committed by GitHub
parent 079a810044
commit 0ec11ce16e
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ function makeRequest(url, data) {
if (global.__debug__) { if (global.__debug__) {
let request = global.__debug__.require('sync-request'); let request = global.__debug__.require('sync-request');
let response = request('POST', url, { let response = request('POST', url, {
body: Buffer.from(JSON.stringify(data)), body: JSON.stringify(data),
headers: { headers: {
"Content-Type": "text/plain;charset=UTF-8" "Content-Type": "text/plain;charset=UTF-8"
} }