File tree Expand file tree Collapse file tree 3 files changed +23
-23
lines changed Expand file tree Collapse file tree 3 files changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,9 @@ Supported request methods.
64
64
Only the matching request methods will return ` mock data ` , otherwise they will be ignored. Multiple request methods can be configured using an array.
65
65
66
66
``` ts
67
- type Method =
68
- | ' GET' | ' POST' | ' PUT' | ' DELETE'
69
- | ' PATCH' | ' HEAD' | ' TRACE' | ' OPTIONS'
67
+ type Method
68
+ = | ' GET' | ' POST' | ' PUT' | ' DELETE'
69
+ | ' PATCH' | ' HEAD' | ' TRACE' | ' OPTIONS'
70
70
` ` `
71
71
72
72
## enabled
Original file line number Diff line number Diff line change @@ -65,9 +65,9 @@ export default defineMock([
65
65
仅符合的请求方法返回 ` mock data ` ,否则忽略。可通过数组配置接口支持多种请求方法。
66
66
67
67
``` ts
68
- type Method =
69
- | ' GET' | ' POST' | ' PUT' | ' DELETE'
70
- | ' PATCH' | ' HEAD' | ' TRACE' | ' OPTIONS'
68
+ type Method
69
+ = | ' GET' | ' POST' | ' PUT' | ' DELETE'
70
+ | ' PATCH' | ' HEAD' | ' TRACE' | ' OPTIONS'
71
71
` ` `
72
72
73
73
## enabled
Original file line number Diff line number Diff line change @@ -249,26 +249,26 @@ export interface ServerBuildOption {
249
249
log ?: LogLevel
250
250
}
251
251
252
- export type Method =
253
- | 'GET'
254
- | 'POST'
255
- | 'PUT'
256
- | 'DELETE'
257
- | 'PATCH'
258
- | 'HEAD'
259
- | 'TRACE'
260
- | 'OPTIONS'
252
+ export type Method
253
+ = | 'GET'
254
+ | 'POST'
255
+ | 'PUT'
256
+ | 'DELETE'
257
+ | 'PATCH'
258
+ | 'HEAD'
259
+ | 'TRACE'
260
+ | 'OPTIONS'
261
261
262
262
type Headers = http . IncomingHttpHeaders
263
263
264
- export type ResponseBody =
265
- | Record < string , any >
266
- | any [ ]
267
- | string
268
- | number
269
- | Readable
270
- | Buffer
271
- | null
264
+ export type ResponseBody
265
+ = | Record < string , any >
266
+ | any [ ]
267
+ | string
268
+ | number
269
+ | Readable
270
+ | Buffer
271
+ | null
272
272
273
273
/**
274
274
* 扩展 request,添加额外的属性和方法
You can’t perform that action at this time.
0 commit comments