MCPcopy Create free account
hub / github.com/effect-app/libs / makeWith

Function makeWith

repos/effect/packages/effect/src/unstable/http/HttpClient.ts:582–595  ·  view source on GitHub ↗
(
  postprocess: (
    request: Effect.Effect<HttpClientRequest.HttpClientRequest, E2, R2>
  ) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>,
  preprocess: HttpClient.Preprocess<E2, R2>
)

Source from the content-addressed store, hash-verified

580 * @category constructors
581 * @since 4.0.0
582 */
583export 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
598const Proto = {

Callers 3

HttpClient.tsFile · 0.70
makeFunction · 0.70
EventLogRemote.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…