11---
22title : MobyPlatforms.ts
3- nav_order : 11
3+ nav_order : 10
44parent : Modules
55---
66
@@ -14,16 +14,41 @@ Added in v1.0.0
1414
1515<h2 class =" text-delta " >Table of contents</h2 >
1616
17+ - [ Browser] ( #browser )
18+ - [ makeWebHttpClientLayer] ( #makewebhttpclientlayer )
1719- [ Connection] ( #connection )
1820 - [ makeAgnosticHttpClientLayer] ( #makeagnostichttpclientlayer )
1921 - [ makeBunHttpClientLayer] ( #makebunhttpclientlayer )
22+ - [ Deno] ( #deno )
2023 - [ makeDenoHttpClientLayer] ( #makedenohttpclientlayer )
24+ - [ Fetch] ( #fetch )
25+ - [ makeFetchHttpClientLayer] ( #makefetchhttpclientlayer )
26+ - [ NodeJS] ( #nodejs )
2127 - [ makeNodeHttpClientLayer] ( #makenodehttpclientlayer )
28+ - [ Undici] ( #undici )
2229 - [ makeUndiciHttpClientLayer] ( #makeundicihttpclientlayer )
23- - [ makeWebHttpClientLayer] ( #makewebhttpclientlayer )
2430
2531---
2632
33+ # Browser
34+
35+ ## makeWebHttpClientLayer
36+
37+ Given the moby connection options, it will construct a layer that provides a
38+ http client that you could use to connect to your moby instance.
39+
40+ This function will dynamically import the ` @effect/platform-browser ` package.
41+
42+ ** Signature**
43+
44+ ``` ts
45+ export declare const makeWebHttpClientLayer: (
46+ connectionOptions : MobyConnection .HttpConnectionOptionsTagged | MobyConnection .HttpsConnectionOptionsTagged
47+ ) => Layer .Layer <HttpClient .HttpClient | Socket .WebSocketConstructor , never , never >
48+ ` ` `
49+
50+ Added in v1.0.0
51+
2752# Connection
2853
2954## makeAgnosticHttpClientLayer
@@ -35,7 +60,7 @@ http client that you could use to connect to your moby instance.
3560
3661` ` ` ts
3762export declare const makeAgnosticHttpClientLayer: (
38- connectionOptions : MobyConnectionOptions
63+ connectionOptions : MobyConnection . MobyConnectionOptions
3964) => Layer .Layer <HttpClient .HttpClient , never , HttpClient .HttpClient >
4065` ` `
4166
@@ -47,72 +72,96 @@ Given the moby connection options, it will construct a layer that provides a
4772http client that you could use to connect to your moby instance. This is no
4873different than the Node implementation currently.
4974
75+ This function will dynamically import the ` @effect / platform - node ` package.
76+
5077**Signature**
5178
5279` ` ` ts
5380export declare const makeBunHttpClientLayer: (
54- connectionOptions : MobyConnectionOptions
81+ connectionOptions : MobyConnection . MobyConnectionOptions
5582) => Layer .Layer <HttpClient .HttpClient | Socket .WebSocketConstructor , never , never >
5683` ` `
5784
5885Added in v1.0.0
5986
87+ # Deno
88+
6089## makeDenoHttpClientLayer
6190
6291Given the moby connection options, it will construct a layer that provides a
6392http client that you could use to connect to your moby instance. This is no
6493different than the Node implementation currently.
6594
95+ This function will dynamically import the ` @effect / platform - node ` package.
96+
97+ FIXME: https://github.com/denoland/deno/issues/21436?
98+
99+ Will fallback to using undici for now because that seems to work
100+
66101**Signature**
67102
68103` ` ` ts
69104export declare const makeDenoHttpClientLayer: (
70- connectionOptions : MobyConnectionOptions
105+ connectionOptions : MobyConnection . MobyConnectionOptions
71106) => Layer .Layer <HttpClient .HttpClient | Socket .WebSocketConstructor , never , never >
72107` ` `
73108
74109Added in v1.0.0
75110
76- ## makeNodeHttpClientLayer
111+ # Fetch
112+
113+ ## makeFetchHttpClientLayer
77114
78115Given the moby connection options, it will construct a layer that provides a
79- http client that you could use to connect to your moby instance.
116+ http client that you could use to connect to your moby instance. By only
117+ supporting http and https connection options, this function does not rely on
118+ any specific platform package and uses the ` @effect / platform / FetchHttpClient `
119+ as its base http layer.
80120
81121**Signature**
82122
83123` ` ` ts
84- export declare const makeNodeHttpClientLayer : (
85- connectionOptions : MobyConnectionOptions
124+ export declare const makeFetchHttpClientLayer : (
125+ connectionOptions : MobyConnection . HttpConnectionOptionsTagged | MobyConnection . HttpsConnectionOptionsTagged
86126) => Layer .Layer <HttpClient .HttpClient | Socket .WebSocketConstructor , never , never >
87127` ` `
88128
89129Added in v1.0.0
90130
91- ## makeUndiciHttpClientLayer
131+ # NodeJS
132+
133+ ## makeNodeHttpClientLayer
92134
93135Given the moby connection options, it will construct a layer that provides a
94136http client that you could use to connect to your moby instance.
95137
138+ This function will dynamically import the ` @effect / platform - node ` package.
139+
96140**Signature**
97141
98142` ` ` ts
99- export declare const makeUndiciHttpClientLayer : (
100- connectionOptions : MobyConnectionOptions
143+ export declare const makeNodeHttpClientLayer : (
144+ connectionOptions : MobyConnection . MobyConnectionOptions
101145) => Layer .Layer <HttpClient .HttpClient | Socket .WebSocketConstructor , never , never >
102146` ` `
103147
104148Added in v1.0.0
105149
106- ## makeWebHttpClientLayer
150+ # Undici
151+
152+ ## makeUndiciHttpClientLayer
107153
108154Given the moby connection options, it will construct a layer that provides a
109155http client that you could use to connect to your moby instance.
110156
157+ This function will dynamically import the ` @effect / platform - node ` and
158+ ` undici ` packages.
159+
111160**Signature**
112161
113162` ` ` ts
114- export declare const makeWebHttpClientLayer : (
115- connectionOptions : HttpConnectionOptionsTagged | HttpsConnectionOptionsTagged
163+ export declare const makeUndiciHttpClientLayer : (
164+ connectionOptions : MobyConnection . MobyConnectionOptions
116165) => Layer .Layer <HttpClient .HttpClient | Socket .WebSocketConstructor , never , never >
117166` ` `
118167
0 commit comments