(response: HttpClientResponse.HttpClientResponse)
| 215 | } |
| 216 | |
| 217 | function json<T>(response: HttpClientResponse.HttpClientResponse) { |
| 218 | if (response.status !== 200) return response.text.pipe(Effect.flatMap((text) => Effect.die(new Error(text)))) |
| 219 | return response.json.pipe(Effect.map((value) => value as T)) |
| 220 | } |
| 221 | |
| 222 | function responseJson(response: HttpClientResponse.HttpClientResponse) { |
| 223 | return response.json |
no outgoing calls
no test coverage detected