(
postprocess: (
request: Effect.Effect<HttpClientRequest.HttpClientRequest, E2, R2>
) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>,
preprocess: HttpClient.Preprocess<E2, R2>
)
| 642 | * @since 4.0.0 |
| 643 | */ |
| 644 | export const makeWith = <E2, R2, E, R>( |
| 645 | postprocess: ( |
| 646 | request: Effect.Effect<HttpClientRequest.HttpClientRequest, E2, R2> |
| 647 | ) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>, |
| 648 | preprocess: HttpClient.Preprocess<E2, R2> |
| 649 | ): HttpClient.With<E, R> => { |
| 650 | const self = Object.create(Proto) |
| 651 | self.preprocess = preprocess |
| 652 | self.postprocess = postprocess |
| 653 | self.execute = function(request: HttpClientRequest.HttpClientRequest) { |
| 654 | return postprocess(preprocess(request)) |
| 655 | } |
| 656 | return self |
| 657 | } |
| 658 | |
| 659 | const Proto = { |
| 660 | [TypeId]: TypeId, |
no outgoing calls
no test coverage detected