(body)
| 77253 | status: `${response.status}`, |
| 77254 | body |
| 77255 | }; |
| 77256 | } |
| 77257 | function getRequestContentType(options = {}) { |
| 77258 | var _a5, _b2, _c2; |
| 77259 | return (_c2 = (_a5 = options.contentType) !== null && _a5 !== void 0 ? _a5 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2["content-type"]) !== null && _c2 !== void 0 ? _c2 : getContentType(options.body); |
| 77260 | } |
| 77261 | function getContentType(body) { |
| 77262 | if (ArrayBuffer.isView(body)) { |
| 77263 | return "application/octet-stream"; |
| 77264 | } |
| 77265 | if (typeof body === "string") { |
| 77266 | try { |
| 77267 | JSON.parse(body); |
| 77268 | return "application/json; charset=UTF-8"; |
| 77269 | } catch (error) { |
| 77270 | return void 0; |
| 77271 | } |
no test coverage detected