swagger-client 3.35.5 → 3.35.6

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.
@@ -23460,8 +23460,13 @@ __webpack_require__.r(__webpack_exports__);
23460
23460
 
23461
23461
  const shouldDownloadAsText = (contentType = '') => /(json|xml|yaml|text)\b/.test(contentType);
23462
23462
  function parseBody(body, contentType) {
23463
- if (contentType && (contentType.indexOf('application/json') === 0 || contentType.indexOf('+json') > 0)) {
23464
- return JSON.parse(body);
23463
+ if (contentType) {
23464
+ if (contentType.indexOf('application/json') === 0 || contentType.indexOf('+json') > 0) {
23465
+ return JSON.parse(body);
23466
+ }
23467
+ if (contentType.indexOf('application/xml') === 0 || contentType.indexOf('+xml') > 0) {
23468
+ return body;
23469
+ }
23465
23470
  }
23466
23471
  return js_yaml__WEBPACK_IMPORTED_MODULE_0__["default"].load(body);
23467
23472
  }