@datocms/rest-client-utils
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -128,3 +128,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var requestId, preCallStack, userAgent, retryCount, logLevel, autoRetry, log, headers, baseUrl, body, queryString, url, _i, _a, _b, key, value, requestPromise_1, response_1, responseContentType, invalidContentType, waitTimeInSecs, responseBody, _c, jobResult, error, error_1; | ||
var requestId, preCallStack, userAgent, retryCount, logLevel, autoRetry, log, headers, baseUrl, body, queryString, url, _i, _a, _b, key, value, requestPromise_1, timeoutId, response_1, responseContentType, invalidContentType, waitTimeInSecs, responseBody, _c, jobResult, error, error_1; | ||
return __generator(this, function (_d) { | ||
@@ -168,3 +168,3 @@ switch (_d.label) { | ||
})); | ||
setTimeout(function () { | ||
timeoutId = setTimeout(function () { | ||
requestPromise_1.cancel(); | ||
@@ -175,2 +175,3 @@ }, options.requestTimeout || 30000); | ||
response_1 = _d.sent(); | ||
clearTimeout(timeoutId); | ||
responseContentType = response_1.headers.get('Content-Type'); | ||
@@ -177,0 +178,0 @@ invalidContentType = responseContentType && !responseContentType.includes('application/json'); |
@@ -122,3 +122,3 @@ var __assign = (this && this.__assign) || function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var requestId, preCallStack, userAgent, retryCount, logLevel, autoRetry, log, headers, baseUrl, body, queryString, url, _i, _a, _b, key, value, requestPromise_1, response_1, responseContentType, invalidContentType, waitTimeInSecs, responseBody, _c, jobResult, error, error_1; | ||
var requestId, preCallStack, userAgent, retryCount, logLevel, autoRetry, log, headers, baseUrl, body, queryString, url, _i, _a, _b, key, value, requestPromise_1, timeoutId, response_1, responseContentType, invalidContentType, waitTimeInSecs, responseBody, _c, jobResult, error, error_1; | ||
return __generator(this, function (_d) { | ||
@@ -162,3 +162,3 @@ switch (_d.label) { | ||
})); | ||
setTimeout(function () { | ||
timeoutId = setTimeout(function () { | ||
requestPromise_1.cancel(); | ||
@@ -169,2 +169,3 @@ }, options.requestTimeout || 30000); | ||
response_1 = _d.sent(); | ||
clearTimeout(timeoutId); | ||
responseContentType = response_1.headers.get('Content-Type'); | ||
@@ -171,0 +172,0 @@ invalidContentType = responseContentType && !responseContentType.includes('application/json'); |
{ | ||
"name": "@datocms/rest-client-utils", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Utilities for DatoCMS REST API clients", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "e370345a81ed2ae180fa51990d25333d3d34f430", | ||
"gitHead": "3db68512cfe35acfafa7ffc7589dc3e33d4aea62", | ||
"devDependencies": { | ||
@@ -46,0 +46,0 @@ "@types/qs": "^6.9.7" |
@@ -181,3 +181,3 @@ import qs from 'qs'; | ||
setTimeout(() => { | ||
const timeoutId = setTimeout(() => { | ||
requestPromise.cancel(); | ||
@@ -188,2 +188,4 @@ }, options.requestTimeout || 30000); | ||
clearTimeout(timeoutId); | ||
const responseContentType = response.headers.get('Content-Type'); | ||
@@ -190,0 +192,0 @@ const invalidContentType = |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
162490
2786