(options: {
readonly url: string
readonly transformClient?: <E, R>(client: HttpClient.HttpClient.With<E, R>) => HttpClient.HttpClient.With<E, R>
})
| 987 | * @since 4.0.0 |
| 988 | */ |
| 989 | export const layerProtocolHttp = (options: { |
| 990 | readonly url: string |
| 991 | readonly transformClient?: <E, R>(client: HttpClient.HttpClient.With<E, R>) => HttpClient.HttpClient.With<E, R> |
| 992 | }): Layer.Layer<Protocol, never, RpcSerialization.RpcSerialization | HttpClient.HttpClient> => |
| 993 | Layer.effect(Protocol)( |
| 994 | Effect.flatMap( |
| 995 | HttpClient.HttpClient, |
| 996 | (client) => { |
| 997 | client = HttpClient.mapRequest(client, HttpClientRequest.prependUrl(options.url)) |
| 998 | return makeProtocolHttp(options.transformClient ? options.transformClient(client) : client) |
| 999 | } |
| 1000 | ) |
| 1001 | ) |
| 1002 | |
| 1003 | /** |
| 1004 | * Creates a client `Protocol` over the current `Socket`, using the current |
nothing calls this directly
no test coverage detected