()
| 256 | } |
| 257 | |
| 258 | get json(): Effect.Effect<Schema.Json, Error.HttpClientError> { |
| 259 | return Effect.flatMap(this.text, (text) => |
| 260 | Effect.try({ |
| 261 | try: () => text === "" ? null : JSON.parse(text), |
| 262 | catch: (cause) => |
| 263 | new Error.HttpClientError({ |
| 264 | reason: new Error.DecodeError({ |
| 265 | request: this.request, |
| 266 | response: this, |
| 267 | cause |
| 268 | }) |
| 269 | }) |
| 270 | })) |
| 271 | } |
| 272 | |
| 273 | private textBody?: Effect.Effect<string, Error.HttpClientError> |
| 274 | get text(): Effect.Effect<string, Error.HttpClientError> { |
no test coverage detected