MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeProtocolHttp

Function makeProtocolHttp

packages/effect/src/rpc/RpcClient.ts:978–987  ·  view source on GitHub ↗
(client: HttpClient.HttpClient, options?: {
  readonly batch?: {
    readonly window: Duration.Input
    readonly maxSize?: number | undefined
  } | undefined
})

Source from the content-addressed store, hash-verified

976 * @since 4.0.0
977 */
978export const makeProtocolHttp = (client: HttpClient.HttpClient, options?: {
979 readonly batch?: {
980 readonly window: Duration.Input
981 readonly maxSize?: number | undefined
982 } | undefined
983}): Effect.Effect<
984 Protocol["Service"],
985 never,
986 RpcSerialization.RpcSerialization
987> => options?.batch ? makeProtocolHttpBatched(client, options.batch) : makeProtocolHttpUnbatched(client)
988
989const makeProtocolHttpUnbatched = (client: HttpClient.HttpClient) =>
990 Protocol.make(Effect.fnUntraced(function*(writeResponse) {

Callers 2

layerProtocolHttpFunction · 0.85
layerProtocolHttpFunction · 0.85

Calls 1

Tested by

no test coverage detected