(
postprocess: (
request: Effect.Effect<HttpClientRequest.HttpClientRequest, E2, R2>
) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>,
preprocess: HttpClient.Preprocess<E2, R2>
)
| 580 | * @category constructors |
| 581 | * @since 4.0.0 |
| 582 | */ |
| 583 | export const makeWith = <E2, R2, E, R>( |
| 584 | postprocess: ( |
| 585 | request: Effect.Effect<HttpClientRequest.HttpClientRequest, E2, R2> |
| 586 | ) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>, |
| 587 | preprocess: HttpClient.Preprocess<E2, R2> |
| 588 | ): HttpClient.With<E, R> => { |
| 589 | const self = Object.create(Proto) |
| 590 | self.preprocess = preprocess |
| 591 | self.postprocess = postprocess |
| 592 | self.execute = function(request: HttpClientRequest.HttpClientRequest) { |
| 593 | return postprocess(preprocess(request)) |
| 594 | } |
| 595 | return self |
| 596 | } |
| 597 | |
| 598 | const Proto = { |
no outgoing calls
no test coverage detected
searching dependent graphs…