({
body = null,
headers,
status = 200,
statusText,
blob,
}: ResponseBuilderOptions = {})
| 404 | } |
| 405 | |
| 406 | export function buildResponse({ |
| 407 | body = null, |
| 408 | headers, |
| 409 | status = 200, |
| 410 | statusText, |
| 411 | blob, |
| 412 | }: ResponseBuilderOptions = {}): Response { |
| 413 | const response = new Response(body, { |
| 414 | headers, |
| 415 | status, |
| 416 | statusText, |
| 417 | }); |
| 418 | |
| 419 | if (blob) { |
| 420 | Object.defineProperty(response, 'blob', { |
| 421 | configurable: true, |
| 422 | value: blob, |
| 423 | }); |
| 424 | } |
| 425 | |
| 426 | return response; |
| 427 | } |
| 428 | |
| 429 | export function buildAnchorElement({ |
| 430 | href = '', |
no outgoing calls