(runner: RunHyperlinkRunner): <E, R>(
client: HttpClient.HttpClient.With<E, R>
) => HttpClient.HttpClient.With<E, R>Pipe-friendly: client.pipe(HttpClientRunGate.withRunner(runner)).
combinators
Source src/HttpClientRunGate.ts:234 lines
export const const withRunner: (
runner: RunHyperlinkRunner
) => <E, R>(
client: HttpClient.HttpClient.With<E, R>
) => HttpClient.HttpClient.With<E, R>
Pipe-friendly: client.pipe(HttpClientRunGate.withRunner(runner)).
withRunner =
(runner: RunHyperlinkRunnerrunner: import RunHyperlinkRunnerRunHyperlinkRunner) =>
<function (type parameter) E in <E, R>(client: HttpClient.HttpClient.With<E, R>): HttpClient.HttpClient.With<E, R>E, function (type parameter) R in <E, R>(client: HttpClient.HttpClient.With<E, R>): HttpClient.HttpClient.With<E, R>R>(client: HttpClient.HttpClient.With<E, R>(parameter) client: {
preprocess: Preprocess<E, R>;
postprocess: Postprocess<E, R>;
execute: (request: HttpClientRequest.HttpClientRequest) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
get: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
head: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
post: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
patch: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
put: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
del: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
options: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
client: import HttpClientHttpClient.HttpClient.interface HttpClient.With<E, R = never>Parameterized HTTP client that may fail with E and require environment R.
Details
It exposes preprocessing, postprocessing, direct request execution, and method-specific helpers.
With<function (type parameter) E in <E, R>(client: HttpClient.HttpClient.With<E, R>): HttpClient.HttpClient.With<E, R>E, function (type parameter) R in <E, R>(client: HttpClient.HttpClient.With<E, R>): HttpClient.HttpClient.With<E, R>R>): import HttpClientHttpClient.HttpClient.interface HttpClient.With<E, R = never>Parameterized HTTP client that may fail with E and require environment R.
Details
It exposes preprocessing, postprocessing, direct request execution, and method-specific helpers.
With<function (type parameter) E in <E, R>(client: HttpClient.HttpClient.With<E, R>): HttpClient.HttpClient.With<E, R>E, function (type parameter) R in <E, R>(client: HttpClient.HttpClient.With<E, R>): HttpClient.HttpClient.With<E, R>R> =>
import HttpClientHttpClient.const transform: <E, R, E, R>(self: HttpClient.HttpClient.With<E, R>, f: (effect: Effect<HttpClientResponse, E, R>, request: HttpClientRequest) => Effect<HttpClientResponse, E, R>) => HttpClient.HttpClient.With<E, R> (+1 overload)Transforms a client by wrapping the response effect for each request.
Details
The transformation receives both the response effect and the original request, allowing it to change success, error, and environment behavior.
transform(client: HttpClient.HttpClient.With<E, R>(parameter) client: {
preprocess: Preprocess<E, R>;
postprocess: Postprocess<E, R>;
execute: (request: HttpClientRequest.HttpClientRequest) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
get: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
head: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
post: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
patch: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
put: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
del: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
options: (url: string | URL, options?: HttpClientRequest.Options.NoUrl) => Effect.Effect<HttpClientResponse.HttpClientResponse, E, R>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
client, (effect: Effect<HttpClientResponse, E, R>(parameter) effect: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
effect, _request: HttpClientRequest(parameter) _request: {
method: HttpMethod;
url: string;
urlParams: UrlParams.UrlParams;
hash: Option.Option<string>;
headers: Headers.Headers;
body: HttpBody.HttpBody;
toString: () => string;
toJSON: () => unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
_request) => runner: RunHyperlinkRunnerrunner(effect: Effect<HttpClientResponse, E, R>(parameter) effect: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
effect));
Referenced by 1 symbols