(
api: HttpApi.HttpApi<ApiId, Groups, ApiError, ApiR>,
options?: {
readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined
readonly transformResponse?:
| ((effect: Effect.Effect<unknown, unknown>) => Effect.Effect<unknown, unknown>)
| undefined
readonly baseUrl?: URL | string | undefined
}
)
| 248 | * @category constructors |
| 249 | */ |
| 250 | export const make = <ApiId extends string, Groups extends HttpApiGroup.Any, ApiError, ApiR>( |
| 251 | api: HttpApi.HttpApi<ApiId, Groups, ApiError, ApiR>, |
| 252 | options?: { |
| 253 | readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined |
| 254 | readonly transformResponse?: |
| 255 | | ((effect: Effect.Effect<unknown, unknown>) => Effect.Effect<unknown, unknown>) |
| 256 | | undefined |
| 257 | readonly baseUrl?: URL | string | undefined |
| 258 | } |
| 259 | ): Effect.Effect< |
| 260 | Simplify<Client<Groups, ApiError, never>>, |
| 261 | never, |
| 262 | HttpApiMiddleware.HttpApiMiddleware.Without<ApiR | HttpApiGroup.ClientContext<Groups>> | HttpClient.HttpClient |
| 263 | > => |
| 264 | Effect.flatMap(HttpClient.HttpClient, (httpClient) => |
| 265 | makeWith(api, { |
| 266 | ...options, |
| 267 | httpClient: options?.transformClient ? options.transformClient(httpClient) : httpClient |
| 268 | })) |
| 269 | |
| 270 | /** |
| 271 | * @since 1.0.0 |
nothing calls this directly
no test coverage detected