(
postprocess: (
request: Effect.Effect<ClientRequest.HttpClientRequest, E2, R2>
) => Effect.Effect<ClientResponse.HttpClientResponse, E, R>,
preprocess: Client.HttpClient.Preprocess<E2, R2>
)
| 141 | |
| 142 | /** @internal */ |
| 143 | export const makeWith = <E2, R2, E, R>( |
| 144 | postprocess: ( |
| 145 | request: Effect.Effect<ClientRequest.HttpClientRequest, E2, R2> |
| 146 | ) => Effect.Effect<ClientResponse.HttpClientResponse, E, R>, |
| 147 | preprocess: Client.HttpClient.Preprocess<E2, R2> |
| 148 | ): Client.HttpClient.With<E, R> => { |
| 149 | const self = Object.create(ClientProto) |
| 150 | self.preprocess = preprocess |
| 151 | self.postprocess = postprocess |
| 152 | self.execute = function(request: ClientRequest.HttpClientRequest) { |
| 153 | return postprocess(preprocess(request)) |
| 154 | } |
| 155 | return self |
| 156 | } |
| 157 | |
| 158 | const responseRegistry = globalValue( |
| 159 | "@effect/platform/HttpClient/responseRegistry", |
no test coverage detected