@adonisjs/http-server 6.8.2-9 → 7.0.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/build/chunk-XX72ATFY.js +4388 -0
  2. package/build/factories/main.d.ts +149 -6
  3. package/build/factories/main.js +331 -14
  4. package/build/index.d.ts +272 -14
  5. package/build/index.js +308 -22
  6. package/build/{src/server/main.d.ts → main-29eaaee4.d.ts} +12 -17
  7. package/build/main-e5b46c83.d.ts +2210 -0
  8. package/build/src/types/main.d.ts +14 -7
  9. package/build/src/types/main.js +0 -15
  10. package/package.json +62 -53
  11. package/build/factories/http_context.d.ts +0 -25
  12. package/build/factories/http_context.js +0 -51
  13. package/build/factories/http_server.d.ts +0 -8
  14. package/build/factories/http_server.js +0 -26
  15. package/build/factories/qs_parser_factory.d.ts +0 -20
  16. package/build/factories/qs_parser_factory.js +0 -44
  17. package/build/factories/request.d.ts +0 -29
  18. package/build/factories/request.js +0 -73
  19. package/build/factories/response.d.ts +0 -29
  20. package/build/factories/response.js +0 -77
  21. package/build/factories/router.d.ts +0 -23
  22. package/build/factories/router.js +0 -45
  23. package/build/factories/server_factory.d.ts +0 -29
  24. package/build/factories/server_factory.js +0 -65
  25. package/build/src/cookies/client.d.ts +0 -37
  26. package/build/src/cookies/client.js +0 -84
  27. package/build/src/cookies/drivers/encrypted.d.ts +0 -16
  28. package/build/src/cookies/drivers/encrypted.js +0 -36
  29. package/build/src/cookies/drivers/plain.d.ts +0 -15
  30. package/build/src/cookies/drivers/plain.js +0 -33
  31. package/build/src/cookies/drivers/signed.d.ts +0 -16
  32. package/build/src/cookies/drivers/signed.js +0 -36
  33. package/build/src/cookies/parser.d.ts +0 -37
  34. package/build/src/cookies/parser.js +0 -167
  35. package/build/src/cookies/serializer.d.ts +0 -33
  36. package/build/src/cookies/serializer.js +0 -79
  37. package/build/src/debug.d.ts +0 -3
  38. package/build/src/debug.js +0 -10
  39. package/build/src/define_config.d.ts +0 -5
  40. package/build/src/define_config.js +0 -51
  41. package/build/src/define_middleware.d.ts +0 -11
  42. package/build/src/define_middleware.js +0 -35
  43. package/build/src/exception_handler.d.ts +0 -112
  44. package/build/src/exception_handler.js +0 -303
  45. package/build/src/exceptions.d.ts +0 -84
  46. package/build/src/exceptions.js +0 -38
  47. package/build/src/helpers.d.ts +0 -23
  48. package/build/src/helpers.js +0 -84
  49. package/build/src/http_context/local_storage.d.ts +0 -12
  50. package/build/src/http_context/local_storage.js +0 -39
  51. package/build/src/http_context/main.d.ts +0 -58
  52. package/build/src/http_context/main.js +0 -105
  53. package/build/src/qs.d.ts +0 -11
  54. package/build/src/qs.js +0 -25
  55. package/build/src/redirect.d.ts +0 -42
  56. package/build/src/redirect.js +0 -140
  57. package/build/src/request.d.ts +0 -565
  58. package/build/src/request.js +0 -865
  59. package/build/src/response.d.ts +0 -540
  60. package/build/src/response.js +0 -1208
  61. package/build/src/router/brisk.d.ts +0 -42
  62. package/build/src/router/brisk.js +0 -85
  63. package/build/src/router/executor.d.ts +0 -8
  64. package/build/src/router/executor.js +0 -29
  65. package/build/src/router/factories/use_return_value.d.ts +0 -6
  66. package/build/src/router/factories/use_return_value.js +0 -22
  67. package/build/src/router/group.d.ts +0 -65
  68. package/build/src/router/group.js +0 -207
  69. package/build/src/router/lookup_store/main.d.ts +0 -49
  70. package/build/src/router/lookup_store/main.js +0 -86
  71. package/build/src/router/lookup_store/route_finder.d.ts +0 -21
  72. package/build/src/router/lookup_store/route_finder.js +0 -49
  73. package/build/src/router/lookup_store/url_builder.d.ts +0 -52
  74. package/build/src/router/lookup_store/url_builder.js +0 -209
  75. package/build/src/router/main.d.ts +0 -128
  76. package/build/src/router/main.js +0 -316
  77. package/build/src/router/matchers.d.ts +0 -27
  78. package/build/src/router/matchers.js +0 -36
  79. package/build/src/router/parser.d.ts +0 -5
  80. package/build/src/router/parser.js +0 -17
  81. package/build/src/router/resource.d.ts +0 -54
  82. package/build/src/router/resource.js +0 -216
  83. package/build/src/router/route.d.ts +0 -92
  84. package/build/src/router/route.js +0 -293
  85. package/build/src/router/store.d.ts +0 -66
  86. package/build/src/router/store.js +0 -195
  87. package/build/src/server/factories/final_handler.d.ts +0 -9
  88. package/build/src/server/factories/final_handler.js +0 -30
  89. package/build/src/server/factories/middleware_handler.d.ts +0 -8
  90. package/build/src/server/factories/middleware_handler.js +0 -16
  91. package/build/src/server/factories/write_response.d.ts +0 -6
  92. package/build/src/server/factories/write_response.js +0 -24
  93. package/build/src/server/main.js +0 -283
  94. package/build/src/types/base.d.ts +0 -19
  95. package/build/src/types/base.js +0 -9
  96. package/build/src/types/middleware.d.ts +0 -35
  97. package/build/src/types/middleware.js +0 -9
  98. package/build/src/types/qs.d.ts +0 -68
  99. package/build/src/types/qs.js +0 -9
  100. package/build/src/types/request.d.ts +0 -39
  101. package/build/src/types/request.js +0 -9
  102. package/build/src/types/response.d.ts +0 -45
  103. package/build/src/types/response.js +0 -9
  104. package/build/src/types/route.d.ts +0 -165
  105. package/build/src/types/route.js +0 -9
  106. package/build/src/types/server.d.ts +0 -72
  107. package/build/src/types/server.js +0 -9
@@ -1,540 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import Macroable from '@poppinss/macroable';
4
- import type { Encryption } from '@adonisjs/encryption';
5
- import { ServerResponse, IncomingMessage } from 'node:http';
6
- import type { Qs } from './qs.js';
7
- import { Redirect } from './redirect.js';
8
- import type { Router } from './router/main.js';
9
- import type { HttpContext } from './http_context/main.js';
10
- import type { CastableHeader, CookieOptions, ResponseConfig, ResponseStream } from './types/response.js';
11
- /**
12
- * The response is a wrapper over [ServerResponse](https://nodejs.org/api/http.html#http_class_http_serverresponse)
13
- * streamlining the process of writing response body and automatically setting up appropriate headers.
14
- */
15
- export declare class Response extends Macroable {
16
- #private;
17
- request: IncomingMessage;
18
- response: ServerResponse;
19
- /**
20
- * Does response has body set that will written to the
21
- * response socket at the end of the request
22
- */
23
- get hasLazyBody(): boolean;
24
- /**
25
- * Find if the response has non-stream content
26
- */
27
- get hasContent(): boolean;
28
- /**
29
- * Returns true when response body is set using "response.stream"
30
- * method
31
- */
32
- get hasStream(): boolean;
33
- /**
34
- * Returns true when response body is set using "response.download"
35
- * or "response.attachment" methods
36
- */
37
- get hasFileToStream(): boolean;
38
- /**
39
- * Returns the response content. Check if the response
40
- * has content using the "hasContent" method
41
- */
42
- get content(): [any, boolean, (string | undefined)?] | undefined;
43
- /**
44
- * Returns reference to the stream set using "response.stream"
45
- * method
46
- */
47
- get outgoingStream(): ResponseStream | undefined;
48
- /**
49
- * Returns reference to the file path set using "response.stream"
50
- * method.
51
- */
52
- get fileToStream(): {
53
- path: string;
54
- generateEtag: boolean;
55
- } | undefined;
56
- /**
57
- * Lazy body is used to set the response body. However, do not
58
- * write it on the socket immediately unless `response.finish`
59
- * is called.
60
- */
61
- lazyBody: Partial<{
62
- content: [any, boolean, string?];
63
- stream: [ResponseStream, ((error: NodeJS.ErrnoException) => [string, number?])?];
64
- fileToStream: [string, boolean, ((error: NodeJS.ErrnoException) => [string, number?])?];
65
- }>;
66
- /**
67
- * The ctx will be set by the context itself. It creates a circular
68
- * reference
69
- */
70
- ctx?: HttpContext;
71
- constructor(request: IncomingMessage, response: ServerResponse, encryption: Encryption, config: ResponseConfig, router: Router, qs: Qs);
72
- /**
73
- * Returns a boolean telling if response is finished or not.
74
- * Any more attempts to update headers or body will result
75
- * in raised exceptions.
76
- */
77
- get finished(): boolean;
78
- /**
79
- * Returns a boolean telling if response headers has been sent or not.
80
- * Any more attempts to update headers will result in raised
81
- * exceptions.
82
- */
83
- get headersSent(): boolean;
84
- /**
85
- * Returns a boolean telling if response headers and body is written
86
- * or not. When value is `true`, you can feel free to write headers
87
- * and body.
88
- */
89
- get isPending(): boolean;
90
- /**
91
- * Writes the body with appropriate response headers. Etag header is set
92
- * when `generateEtag` is set to `true`.
93
- *
94
- * Empty body results in `204`.
95
- */
96
- protected writeBody(content: any, generateEtag: boolean, jsonpCallbackName?: string): void;
97
- /**
98
- * Stream the body to the response and handles cleaning up the stream
99
- */
100
- protected streamBody(body: ResponseStream, errorCallback?: (error: NodeJS.ErrnoException) => [string, number?]): Promise<void>;
101
- /**
102
- * Downloads a file by streaming it to the response
103
- */
104
- protected streamFileForDownload(filePath: string, generateEtag: boolean, errorCallback?: (error: NodeJS.ErrnoException) => [string, number?]): Promise<void>;
105
- /**
106
- * Writes headers with the Node.js res object using the
107
- * response.setHeader method
108
- */
109
- flushHeaders(): void;
110
- /**
111
- * Calls res.writeHead on the Node.js res object.
112
- */
113
- writeHead(statusCode?: number): this;
114
- /**
115
- * Returns the existing value for a given HTTP response
116
- * header.
117
- */
118
- getHeader(key: string): import("http").OutgoingHttpHeader | undefined;
119
- /**
120
- * Get response headers
121
- */
122
- getHeaders(): {
123
- [x: string]: import("http").OutgoingHttpHeader | undefined;
124
- };
125
- /**
126
- * Set header on the response. To `append` values to the existing header, we suggest
127
- * using [[append]] method.
128
- *
129
- * If `value` is non existy, then header won't be set.
130
- *
131
- * @example
132
- * ```js
133
- * response.header('content-type', 'application/json')
134
- * ```
135
- */
136
- header(key: string, value: CastableHeader): this;
137
- /**
138
- * Append value to an existing header. To replace the value, we suggest using
139
- * [[header]] method.
140
- *
141
- * If `value` is not existy, then header won't be set.
142
- *
143
- * @example
144
- * ```js
145
- * response.append('set-cookie', 'username=virk')
146
- * ```
147
- */
148
- append(key: string, value: CastableHeader): this;
149
- /**
150
- * Adds HTTP response header, when it doesn't exists already.
151
- */
152
- safeHeader(key: string, value: CastableHeader): this;
153
- /**
154
- * Removes the existing response header from being sent.
155
- */
156
- removeHeader(key: string): this;
157
- /**
158
- * Returns the status code for the response
159
- */
160
- getStatus(): number;
161
- /**
162
- * Set HTTP status code
163
- */
164
- status(code: number): this;
165
- /**
166
- * Set's status code only when it's not explictly
167
- * set
168
- */
169
- safeStatus(code: number): this;
170
- /**
171
- * Set response type by looking up for the mime-type using
172
- * partial types like file extensions.
173
- *
174
- * Make sure to read [mime-types](https://www.npmjs.com/package/mime-types) docs
175
- * too.
176
- *
177
- * @example
178
- * ```js
179
- * response.type('.json') // Content-type: application/json
180
- * ```
181
- */
182
- type(type: string, charset?: string): this;
183
- /**
184
- * Set the Vary HTTP header
185
- */
186
- vary(field: string | string[]): this;
187
- /**
188
- * Set etag by computing hash from the body. This class will set the etag automatically
189
- * when `etag = true` in the defined config object.
190
- *
191
- * Use this function, when you want to compute etag manually for some other resons.
192
- */
193
- setEtag(body: any, weak?: boolean): this;
194
- /**
195
- * Returns a boolean telling if the new response etag evaluates same
196
- * as the request header `if-none-match`. In case of `true`, the
197
- * server must return `304` response, telling the browser to
198
- * use the client cache.
199
- *
200
- * You won't have to deal with this method directly, since AdonisJs will
201
- * handle this for you when `http.etag = true` inside `config/app.js` file.
202
- *
203
- * However, this is how you can use it manually.
204
- *
205
- * @example
206
- * ```js
207
- * const responseBody = view.render('some-view')
208
- *
209
- * // sets the HTTP etag header for response
210
- * response.setEtag(responseBody)
211
- *
212
- * if (response.fresh()) {
213
- * response.sendStatus(304)
214
- * } else {
215
- * response.send(responseBody)
216
- * }
217
- * ```
218
- */
219
- fresh(): boolean;
220
- /**
221
- * Returns the response body. Returns null when response
222
- * body is a stream
223
- */
224
- getBody(): any;
225
- /**
226
- * Send the body as response and optionally generate etag. The default value
227
- * is read from `config/app.js` file, using `http.etag` property.
228
- *
229
- * This method buffers the body if `explicitEnd = true`, which is the default
230
- * behavior and do not change, unless you know what you are doing.
231
- */
232
- send(body: any, generateEtag?: boolean): void;
233
- /**
234
- * Alias of [[send]]
235
- */
236
- json(body: any, generateEtag?: boolean): void;
237
- /**
238
- * Writes response as JSONP. The callback name is resolved as follows, with priority
239
- * from top to bottom.
240
- *
241
- * 1. Explicitly defined as 2nd Param.
242
- * 2. Fetch from request query string.
243
- * 3. Use the config value `http.jsonpCallbackName` from `config/app.js`.
244
- * 4. Fallback to `callback`.
245
- *
246
- * This method buffers the body if `explicitEnd = true`, which is the default
247
- * behavior and do not change, unless you know what you are doing.
248
- */
249
- jsonp(body: any, callbackName?: string, generateEtag?: boolean): void;
250
- /**
251
- * Pipe stream to the response. This method will gracefully destroy
252
- * the stream, avoiding memory leaks.
253
- *
254
- * If `raiseErrors=false`, then this method will self handle all the exceptions by
255
- * writing a generic HTTP response. To have more control over the error, it is
256
- * recommended to set `raiseErrors=true` and wrap this function inside a
257
- * `try/catch` statement.
258
- *
259
- * Streaming a file from the disk and showing 404 when file is missing.
260
- *
261
- * @example
262
- * ```js
263
- * // Errors handled automatically with generic HTTP response
264
- * response.stream(fs.createReadStream('file.txt'))
265
- *
266
- * // Manually handle (note the await call)
267
- * try {
268
- * await response.stream(fs.createReadStream('file.txt'))
269
- * } catch () {
270
- * response.status(404).send('File not found')
271
- * }
272
- * ```
273
- */
274
- stream(body: ResponseStream, errorCallback?: (error: NodeJS.ErrnoException) => [string, number?]): void;
275
- /**
276
- * Download file by streaming it from the file path. This method will setup
277
- * appropriate `Content-type`, `Content-type` and `Last-modified` headers.
278
- *
279
- * Unexpected stream errors are handled gracefully to avoid memory leaks.
280
- *
281
- * If `raiseErrors=false`, then this method will self handle all the exceptions by
282
- * writing a generic HTTP response. To have more control over the error, it is
283
- * recommended to set `raiseErrors=true` and wrap this function inside a
284
- * `try/catch` statement.
285
- *
286
- * @example
287
- * ```js
288
- * // Errors handled automatically with generic HTTP response
289
- * response.download('somefile.jpg')
290
- *
291
- * // Manually handle (note the await call)
292
- * try {
293
- * await response.download('somefile.jpg')
294
- * } catch (error) {
295
- * response.status(error.code === 'ENOENT' ? 404 : 500)
296
- * response.send('Cannot process file')
297
- * }
298
- * ```
299
- */
300
- download(filePath: string, generateEtag?: boolean, errorCallback?: (error: NodeJS.ErrnoException) => [string, number?]): void;
301
- /**
302
- * Download the file by forcing the user to save the file vs displaying it
303
- * within the browser.
304
- *
305
- * Internally calls [[download]]
306
- */
307
- attachment(filePath: string, name?: string, disposition?: string, generateEtag?: boolean, errorCallback?: (error: NodeJS.ErrnoException) => [string, number?]): void;
308
- /**
309
- * Set the location header.
310
- *
311
- * @example
312
- * ```js
313
- * response.location('/login')
314
- * ```
315
- */
316
- location(url: string): this;
317
- /**
318
- * Redirect the request.
319
- *
320
- * @example
321
- * ```js
322
- * response.redirect('/foo')
323
- * response.redirect().toRoute('foo.bar')
324
- * response.redirect().back()
325
- * ```
326
- */
327
- redirect(): Redirect;
328
- redirect(path: string, forwardQueryString?: boolean, statusCode?: number): void;
329
- /**
330
- * Abort the request with custom body and a status code. 400 is
331
- * used when status is not defined
332
- */
333
- abort(body: any, status?: number): never;
334
- /**
335
- * Abort the request with custom body and a status code when
336
- * passed condition returns `true`
337
- */
338
- abortIf(condition: unknown, body: any, status?: number): asserts condition is undefined | null | false;
339
- /**
340
- * Abort the request with custom body and a status code when
341
- * passed condition returns `false`
342
- */
343
- abortUnless<T>(condition: T, body: any, status?: number): asserts condition is Exclude<T, undefined | null | false>;
344
- /**
345
- * Set signed cookie as the response header. The inline options overrides
346
- * all options from the config.
347
- */
348
- cookie(key: string, value: any, options?: Partial<CookieOptions>): this;
349
- /**
350
- * Set encrypted cookie as the response header. The inline options overrides
351
- * all options from the config.
352
- */
353
- encryptedCookie(key: string, value: any, options?: Partial<CookieOptions>): this;
354
- /**
355
- * Set unsigned cookie as the response header. The inline options overrides
356
- * all options from the config.
357
- */
358
- plainCookie(key: string, value: any, options?: Partial<CookieOptions & {
359
- encode: boolean;
360
- }>): this;
361
- /**
362
- * Clear existing cookie.
363
- */
364
- clearCookie(key: string, options?: Partial<CookieOptions>): this;
365
- /**
366
- * Finishes the response by writing the lazy body, when `explicitEnd = true`
367
- * and response is already pending.
368
- *
369
- * Calling this method twice or when `explicitEnd = false` is noop.
370
- */
371
- finish(): void;
372
- /**
373
- * Shorthand method to finish request with "100" status code
374
- */
375
- continue(): void;
376
- /**
377
- * Shorthand method to finish request with "101" status code
378
- */
379
- switchingProtocols(): void;
380
- /**
381
- * Shorthand method to finish request with "200" status code
382
- */
383
- ok(body: any, generateEtag?: boolean): void;
384
- /**
385
- * Shorthand method to finish request with "201" status code
386
- */
387
- created(body?: any, generateEtag?: boolean): void;
388
- /**
389
- * Shorthand method to finish request with "202" status code
390
- */
391
- accepted(body: any, generateEtag?: boolean): void;
392
- /**
393
- * Shorthand method to finish request with "203" status code
394
- */
395
- nonAuthoritativeInformation(body: any, generateEtag?: boolean): void;
396
- /**
397
- * Shorthand method to finish request with "204" status code
398
- */
399
- noContent(): void;
400
- /**
401
- * Shorthand method to finish request with "205" status code
402
- */
403
- resetContent(): void;
404
- /**
405
- * Shorthand method to finish request with "206" status code
406
- */
407
- partialContent(body: any, generateEtag?: boolean): void;
408
- /**
409
- * Shorthand method to finish request with "300" status code
410
- */
411
- multipleChoices(body?: any, generateEtag?: boolean): void;
412
- /**
413
- * Shorthand method to finish request with "301" status code
414
- */
415
- movedPermanently(body?: any, generateEtag?: boolean): void;
416
- /**
417
- * Shorthand method to finish request with "302" status code
418
- */
419
- movedTemporarily(body?: any, generateEtag?: boolean): void;
420
- /**
421
- * Shorthand method to finish request with "303" status code
422
- */
423
- seeOther(body?: any, generateEtag?: boolean): void;
424
- /**
425
- * Shorthand method to finish request with "304" status code
426
- */
427
- notModified(body?: any, generateEtag?: boolean): void;
428
- /**
429
- * Shorthand method to finish request with "305" status code
430
- */
431
- useProxy(body?: any, generateEtag?: boolean): void;
432
- /**
433
- * Shorthand method to finish request with "307" status code
434
- */
435
- temporaryRedirect(body?: any, generateEtag?: boolean): void;
436
- /**
437
- * Shorthand method to finish request with "400" status code
438
- */
439
- badRequest(body?: any, generateEtag?: boolean): void;
440
- /**
441
- * Shorthand method to finish request with "401" status code
442
- */
443
- unauthorized(body?: any, generateEtag?: boolean): void;
444
- /**
445
- * Shorthand method to finish request with "402" status code
446
- */
447
- paymentRequired(body?: any, generateEtag?: boolean): void;
448
- /**
449
- * Shorthand method to finish request with "403" status code
450
- */
451
- forbidden(body?: any, generateEtag?: boolean): void;
452
- /**
453
- * Shorthand method to finish request with "404" status code
454
- */
455
- notFound(body?: any, generateEtag?: boolean): void;
456
- /**
457
- * Shorthand method to finish request with "405" status code
458
- */
459
- methodNotAllowed(body?: any, generateEtag?: boolean): void;
460
- /**
461
- * Shorthand method to finish request with "406" status code
462
- */
463
- notAcceptable(body?: any, generateEtag?: boolean): void;
464
- /**
465
- * Shorthand method to finish request with "407" status code
466
- */
467
- proxyAuthenticationRequired(body?: any, generateEtag?: boolean): void;
468
- /**
469
- * Shorthand method to finish request with "408" status code
470
- */
471
- requestTimeout(body?: any, generateEtag?: boolean): void;
472
- /**
473
- * Shorthand method to finish request with "409" status code
474
- */
475
- conflict(body?: any, generateEtag?: boolean): void;
476
- /**
477
- * Shorthand method to finish request with "401" status code
478
- */
479
- gone(body?: any, generateEtag?: boolean): void;
480
- /**
481
- * Shorthand method to finish request with "411" status code
482
- */
483
- lengthRequired(body?: any, generateEtag?: boolean): void;
484
- /**
485
- * Shorthand method to finish request with "412" status code
486
- */
487
- preconditionFailed(body?: any, generateEtag?: boolean): void;
488
- /**
489
- * Shorthand method to finish request with "413" status code
490
- */
491
- requestEntityTooLarge(body?: any, generateEtag?: boolean): void;
492
- /**
493
- * Shorthand method to finish request with "414" status code
494
- */
495
- requestUriTooLong(body?: any, generateEtag?: boolean): void;
496
- /**
497
- * Shorthand method to finish request with "415" status code
498
- */
499
- unsupportedMediaType(body?: any, generateEtag?: boolean): void;
500
- /**
501
- * Shorthand method to finish request with "416" status code
502
- */
503
- requestedRangeNotSatisfiable(body?: any, generateEtag?: boolean): void;
504
- /**
505
- * Shorthand method to finish request with "417" status code
506
- */
507
- expectationFailed(body?: any, generateEtag?: boolean): void;
508
- /**
509
- * Shorthand method to finish request with "422" status code
510
- */
511
- unprocessableEntity(body?: any, generateEtag?: boolean): void;
512
- /**
513
- * Shorthand method to finish request with "429" status code
514
- */
515
- tooManyRequests(body?: any, generateEtag?: boolean): void;
516
- /**
517
- * Shorthand method to finish request with "500" status code
518
- */
519
- internalServerError(body?: any, generateEtag?: boolean): void;
520
- /**
521
- * Shorthand method to finish request with "501" status code
522
- */
523
- notImplemented(body?: any, generateEtag?: boolean): void;
524
- /**
525
- * Shorthand method to finish request with "502" status code
526
- */
527
- badGateway(body?: any, generateEtag?: boolean): void;
528
- /**
529
- * Shorthand method to finish request with "503" status code
530
- */
531
- serviceUnavailable(body?: any, generateEtag?: boolean): void;
532
- /**
533
- * Shorthand method to finish request with "504" status code
534
- */
535
- gatewayTimeout(body?: any, generateEtag?: boolean): void;
536
- /**
537
- * Shorthand method to finish request with "505" status code
538
- */
539
- httpVersionNotSupported(body?: any, generateEtag?: boolean): void;
540
- }