From 003407776378c2ce75a53a2cc88ce52a277848f3 Mon Sep 17 00:00:00 2001 From: Ville Immonen Date: Tue, 17 Oct 2017 11:24:13 +0000 Subject: [PATCH] Use Chromium's XMLHttpRequest in XDE, Node's http in exp (#1057) * [XDL] Api/ApiV2 now using Axios instead of Request * yarn * Ready for PR * fixes after review * nit * Ready for review P3 * removed console log * Made requested changes + fixed FormData.js * Remove unused variables * Stop swallowing errors in Api.downloadAsync * Download data as an ArrayBuffer Avoid the extra Blob->ArrayBuffer conversion * Add missing flow pragma * Fix asset uploads and publishing from XDE In order to use XMLHttpRequest and FormData to upload the asset files, we must read them into a Blob. On Node.js, a read stream can be used instead. * Make use of paramsSerializer option of Axios Simplify the query string handling code. * Fix axios.request not being called w/o requestOptions * Revert the removal of fs-mock-setup.js (removed in c5a62a7027d) * [devtools] Fix API integration test Apply similar changes as the UserManager changes here: https://github.com/expo/universe/commit/533b9f7f51897801d198f3540fb95a14b05183d2 fbshipit-source-id: 9565cb1 --- src/ui/NewProjectModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/NewProjectModal.js b/src/ui/NewProjectModal.js index 76b04a64..4d0c7cb3 100644 --- a/src/ui/NewProjectModal.js +++ b/src/ui/NewProjectModal.js @@ -334,7 +334,7 @@ class NewProjectModal extends React.Component { if (this._currentRequestID === requestID) { Logger.notifications.info( { code: NotificationCode.DOWNLOAD }, - Math.round(progress * 100) + progress ); } },