(body, contentType = "")
| 77291 | abortSignal: options.abortSignal, |
| 77292 | onUploadProgress: options.onUploadProgress, |
| 77293 | onDownloadProgress: options.onDownloadProgress, |
| 77294 | timeout: options.timeout, |
| 77295 | enableBrowserStreams: true, |
| 77296 | streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 |
| 77297 | }); |
| 77298 | } |
| 77299 | function getRequestBody(body, contentType = "") { |
| 77300 | if (body === void 0) { |
| 77301 | return { body: void 0 }; |
| 77302 | } |
| 77303 | if (isReadableStream3(body)) { |
| 77304 | return { body }; |
| 77305 | } |
| 77306 | const firstType = contentType.split(";")[0]; |
| 77307 | if (firstType === "application/json") { |
| 77308 | return { body: JSON.stringify(body) }; |
| 77309 | } |
| 77310 | if (ArrayBuffer.isView(body)) { |
| 77311 | return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; |
| 77312 | } |
| 77313 | switch (firstType) { |
| 77314 | case "multipart/form-data": |
| 77315 | return isRLCFormDataInput(body) ? { formData: processFormData(body) } : { body: JSON.stringify(body) }; |
| 77316 | case "text/plain": |
| 77317 | return { body: String(body) }; |
| 77318 | default: |
| 77319 | if (typeof body === "string") { |
| 77320 | return { body }; |
| 77321 | } |
no test coverage detected