( method: HttpMethod, input: RequestInfo, req: REQ | null, init?: RequestInit, )
| 121 | } |
| 122 | |
| 123 | async function fetchHelper<REQ>( |
| 124 | method: HttpMethod, |
| 125 | input: RequestInfo, |
| 126 | req: REQ | null, |
| 127 | init?: RequestInit, |
| 128 | ): Promise<Response> { |
| 129 | return await fetch(input, { |
| 130 | ...init, |
| 131 | method: method, |
| 132 | body: req ? JSON.stringify(req) : null, |
| 133 | headers: { |
| 134 | ...init?.headers, |
| 135 | "Content-Type": "application/json", |
| 136 | }, |
| 137 | }); |
| 138 | } |
| 139 | |
| 140 | const parseResponseHeaders = (res: Response): ResponseHeaders => { |
| 141 | return { |
no outgoing calls
no test coverage detected