@nrfcloud/bdd-feature-runner-aws
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -35,2 +35,6 @@ "use strict"; | ||
: undefined; | ||
headers['Content-Type'] = | ||
body != null && !passBinary && typeof body !== 'string' | ||
? 'application/json' | ||
: 'text/plain'; | ||
// Uncomment for debug | ||
@@ -51,2 +55,3 @@ /* console.log( | ||
const contentType = res.headers.get('content-type') || '', mediaType = contentType.split(';')[0]; | ||
const text = await res.text(); | ||
if (headers.Accept.indexOf(mediaType) < 0) { | ||
@@ -70,4 +75,4 @@ throw new Error(`The content-type "${contentType}" of the response does not match accepted media-type ${headers.Accept}`); | ||
? isJson | ||
? await res.json() | ||
: await res.blob() | ||
? JSON.parse(text) | ||
: Buffer.from(text) | ||
: undefined, | ||
@@ -74,0 +79,0 @@ }; |
{ | ||
"name": "@nrfcloud/bdd-feature-runner-aws", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"description": "BDD Test Runner for cloud native applications made with AWS.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
336672
9698