Comparing version 4.4.1 to 4.5.0
@@ -218,5 +218,9 @@ 'use strict'; | ||
if (response.status === 202 && !settings.dontPollOnResult) { | ||
// poll on new provided url, fallback to the original one | ||
// (for example validElements returns 303 first with new url which may then return 202 to poll on) | ||
var finalUrl = response.url || url; | ||
var finalSettings = settings; | ||
// if the response is 202 and Location header is not empty, let's poll on the new Location | ||
var finalUrl = url; | ||
var finalSettings = settings; | ||
if (response.headers.has('Location')) { | ||
@@ -228,2 +232,3 @@ finalUrl = response.headers.get('Location'); | ||
delete finalSettings.body; | ||
return handlePolling(finalUrl, finalSettings, ajax); | ||
@@ -230,0 +235,0 @@ } |
{ | ||
"name": "gooddata", | ||
"version": "4.4.1", | ||
"version": "4.5.0", | ||
"author": "GoodData", | ||
@@ -5,0 +5,0 @@ "description": "GoodData JavaScript SDK", |
@@ -201,5 +201,9 @@ // Copyright (C) 2007-2013, GoodData(R) Corporation. All rights reserved. | ||
if (response.status === 202 && !settings.dontPollOnResult) { | ||
// poll on new provided url, fallback to the original one | ||
// (for example validElements returns 303 first with new url which may then return 202 to poll on) | ||
let finalUrl = response.url || url; | ||
const finalSettings = settings; | ||
// if the response is 202 and Location header is not empty, let's poll on the new Location | ||
let finalUrl = url; | ||
const finalSettings = settings; | ||
if (response.headers.has('Location')) { | ||
@@ -211,2 +215,3 @@ finalUrl = response.headers.get('Location'); | ||
delete finalSettings.body; | ||
return handlePolling(finalUrl, finalSettings, ajax); | ||
@@ -213,0 +218,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1131568
26529