curtain-web-api 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -233,9 +233,9 @@ class CurtainWebAPI {
233
233
  let headers = new axios_1.AxiosHeaders();
234
234
  headers["Accept"] = "application/json";
235
235
  if (onDownloadProgress !== undefined) {
236
- return this.axiosInstance.get(this.baseURL + "curtain/" + id + "/download/token=" + token + "/", { responseType: "json", onDownloadProgress: onDownloadProgress }).then((response) => {
236
+ return this.axiosInstance.get(this.baseURL + "curtain/" + id + "/download/token=" + token + "/", { responseType: "json" }).then((response) => {
237
237
  if ("url" in response.data) {
238
- return this.axiosInstance.get(response.data.url, { responseType: "json" }).then((response) => {
238
+ return this.axiosInstance.get(response.data.url, { responseType: "json", onDownloadProgress: onDownloadProgress }).then((response) => {
239
239
  return response;
240
240
  });
241
241
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curtain-web-api",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -221,9 +221,9 @@ export class CurtainWebAPI {
221
221
  let headers = new AxiosHeaders();
222
222
  headers["Accept"] = "application/json";
223
223
  if (onDownloadProgress !== undefined) {
224
- return this.axiosInstance.get(this.baseURL + "curtain/" + id + "/download/token=" + token + "/", {responseType:"json", onDownloadProgress: onDownloadProgress}).then((response) => {
224
+ return this.axiosInstance.get(this.baseURL + "curtain/" + id + "/download/token=" + token + "/", {responseType:"json"}).then((response) => {
225
225
  if ("url" in response.data) {
226
- return this.axiosInstance.get(response.data.url, {responseType: "json"}).then((response) => {
226
+ return this.axiosInstance.get(response.data.url, {responseType: "json", onDownloadProgress: onDownloadProgress}).then((response) => {
227
227
  return response;
228
228
  })
229
229
  } else {