( self: HttpClient.With<E, R> )
| 1514 | * @since 4.0.0 |
| 1515 | */ |
| 1516 | export const withScope = <E, R>( |
| 1517 | self: HttpClient.With<E, R> |
| 1518 | ): HttpClient.With<E, R | Scope.Scope> => |
| 1519 | transform( |
| 1520 | self, |
| 1521 | (effect, request) => { |
| 1522 | const controller = new AbortController() |
| 1523 | scopedRequests.set(request, controller) |
| 1524 | return Effect.andThen( |
| 1525 | Effect.addFinalizer(() => Effect.sync(() => controller.abort())), |
| 1526 | effect |
| 1527 | ) |
| 1528 | } |
| 1529 | ) |
| 1530 | |
| 1531 | /** |
| 1532 | * Enables following HTTP redirects up to a specified number of times. |
nothing calls this directly
no test coverage detected