From cc779b4da464390f82f9b513a61912f18cce07ad Mon Sep 17 00:00:00 2001
From: Ben Wheeler <wheeler.benjamin@gmail.com>
Date: Sat, 6 Oct 2018 15:16:29 -0400
Subject: [PATCH] =?UTF-8?q?Attempt=20to=20fix=20storage=20xhr=20request;?=
 =?UTF-8?q?=20didn=E2=80=99t=20work?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/lib/storage.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lib/storage.js b/src/lib/storage.js
index 24a9e63cc..a1799f303 100644
--- a/src/lib/storage.js
+++ b/src/lib/storage.js
@@ -34,14 +34,22 @@ class Storage extends ScratchStorage {
     getProjectCreateConfig () {
         return {
             url: `${this.projectHost}/`,
-            json: true,
+            headers: {
+                Accept: 'application/json'
+            },
+            // NOTE: using json: true here unexpectedly breaks saving
+            // json: true,
             withCredentials: true
         };
     }
     getProjectUpdateConfig (projectAsset) {
         return {
             url: `${this.projectHost}/${projectAsset.assetId}`,
-            json: true,
+            headers: {
+                Accept: 'application/json'
+            },
+            // NOTE: using json: true here unexpectedly breaks saving
+            // json: true,
             withCredentials: true
         };
     }
-- 
GitLab