You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/web/docs/options.md
+70-7Lines changed: 70 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,23 +43,86 @@ register(options)
43
43
44
44
### intercept
45
45
46
-
-**Description**: Options for intercepting specific packets. If set to `false`, the packet will not be intercepted.
46
+
-**Description**: Options for intercepting different types of requests.
47
+
If a property is set to `false`, that specific type of request will not be intercepted.
48
+
By default, all are intercepted if not explicitly set.
47
49
48
50
#### intercept.fetch
49
51
52
+
-**Description**: Whether to intercept `fetch` requests.
50
53
-**Default value**: `true`
51
54
52
-
-**Description**: Whether to intercept globalThis.fetch
53
-
54
55
#### intercept.normal
55
56
57
+
-**Description**: Whether to intercept `http/https` requests.
56
58
-**Default value**: `true`
57
59
58
-
-**Description**: Whether to intercept requests made by http/https basic packages
59
-
60
60
#### intercept.undici
61
61
62
+
-**Description**: Options for intercepting `undici` requests. Set to `false` to disable all `undici` interception. Otherwise, configure specific `undici` interception options.
62
63
-**Default value**: `false`
63
64
-**Options**:
64
-
-`fetch`: `false` or `{}`, not intercepted by default. Used to intercept `undici.fetch`
65
-
-`normal`: `false` or `{}`, not intercepted by default. Used to intercept `undici.request`
65
+
-`fetch`: Whether to intercept `undici`'s `fetch` requests. Defaults to `false`.
66
+
-`normal`: Whether to intercept `undici`'s normal requests. Defaults to `false`.
67
+
68
+
## ConnectOptions
69
+
70
+
The `ConnectOptions` interface configures options for connecting to the network debugger.
71
+
72
+
### port
73
+
74
+
-**Description**: Main process port
75
+
-**Default value**: `5270`
76
+
77
+
## UnregisterOptions
78
+
79
+
The `UnregisterOptions` interface configures options for unregistering the network debugger.
80
+
81
+
### port
82
+
83
+
-**Description**: Main process port
84
+
-**Default value**: `5270`
85
+
86
+
## SetRequestInterceptorOptions
87
+
88
+
The `SetRequestInterceptorOptions` interface configures options for setting a request interceptor.
89
+
90
+
### port
91
+
92
+
-**Description**: Main process port
93
+
-**Default value**: `5270`
94
+
95
+
### request
96
+
97
+
-**Description**: A function to intercept and modify outgoing requests.
98
+
99
+
## SetResponseInterceptorOptions
100
+
101
+
The `SetResponseInterceptorOptions` interface configures options for setting a response interceptor.
102
+
103
+
### port
104
+
105
+
-**Description**: Main process port
106
+
-**Default value**: `5270`
107
+
108
+
### response
109
+
110
+
-**Description**: A function to intercept and modify incoming responses.
111
+
112
+
## RemoveRequestInterceptorOptions
113
+
114
+
The `RemoveRequestInterceptorOptions` interface configures options for removing a request interceptor.
115
+
116
+
### port
117
+
118
+
-**Description**: Main process port
119
+
-**Default value**: `5270`
120
+
121
+
## RemoveResponseInterceptorOptions
122
+
123
+
The `RemoveResponseInterceptorOptions` interface configures options for removing a response interceptor.
0 commit comments