(
init: HttpResponseInit = {},
)
| 12 | } |
| 13 | |
| 14 | export function normalizeResponseInit( |
| 15 | init: HttpResponseInit = {}, |
| 16 | ): HttpResponseDecoratedInit { |
| 17 | const status = init?.status || 200 |
| 18 | const statusText = init?.statusText || message[status] || '' |
| 19 | const headers = new Headers(init?.headers) |
| 20 | |
| 21 | return { |
| 22 | ...init, |
| 23 | headers, |
| 24 | status, |
| 25 | statusText, |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | export function decorateResponse( |
| 30 | response: Response, |
no outgoing calls
no test coverage detected
searching dependent graphs…