@utiliread/http 1.19.6 → 1.20.1

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 (76) hide show
  1. package/dist/event-aggregator.d.ts +11 -0
  2. package/dist/events.d.ts +11 -0
  3. package/dist/header-names.d.ts +182 -0
  4. package/dist/helpers.d.ts +5 -0
  5. package/dist/http-builder.d.ts +61 -0
  6. package/dist/http-error.d.ts +10 -0
  7. package/dist/http-response.d.ts +18 -0
  8. package/dist/http.d.ts +33 -0
  9. package/dist/http.spec.d.ts +1 -0
  10. package/dist/index.d.ts +16 -231
  11. package/dist/index.js +616 -242
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +601 -215
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/mapper.d.ts +9 -0
  16. package/dist/pagination.d.ts +23 -0
  17. package/dist/{json.d.ts → plugins/json/index.d.ts} +1 -2
  18. package/dist/plugins/json/index.js +87 -0
  19. package/dist/plugins/json/index.js.map +1 -0
  20. package/dist/plugins/json/index.mjs +85 -0
  21. package/dist/plugins/json/index.mjs.map +1 -0
  22. package/dist/{jsonpatch.d.ts → plugins/jsonpatch/index.d.ts} +0 -2
  23. package/dist/plugins/jsonpatch/index.js +21 -0
  24. package/dist/plugins/jsonpatch/index.js.map +1 -0
  25. package/dist/plugins/jsonpatch/index.mjs +19 -0
  26. package/dist/plugins/jsonpatch/index.mjs.map +1 -0
  27. package/dist/{msgpack.d.ts → plugins/msgpack/index.d.ts} +1 -2
  28. package/dist/plugins/msgpack/index.js +41 -0
  29. package/dist/plugins/msgpack/index.js.map +1 -0
  30. package/dist/plugins/msgpack/index.mjs +39 -0
  31. package/dist/plugins/msgpack/index.mjs.map +1 -0
  32. package/dist/problem-details.d.ts +7 -0
  33. package/dist/query-string.d.ts +6 -0
  34. package/dist/query-string.spec.d.ts +1 -0
  35. package/dist/status-codes.d.ts +65 -0
  36. package/dist/timeout-error.d.ts +3 -0
  37. package/json.d.ts +1 -1
  38. package/json.rollup.config.mjs +32 -0
  39. package/jsonpatch.d.ts +1 -1
  40. package/jsonpatch.rollup.config.mjs +32 -0
  41. package/msgpack.d.ts +1 -1
  42. package/msgpack.rollup.config.mjs +37 -0
  43. package/package.json +24 -24
  44. package/rollup.config.mjs +31 -0
  45. package/src/header-names.ts +273 -0
  46. package/src/index.ts +2 -1
  47. package/{plugins/json/src → src/plugins/json}/index.ts +138 -142
  48. package/{plugins/jsonpatch/src → src/plugins/jsonpatch}/index.ts +36 -36
  49. package/{plugins/msgpack/src → src/plugins/msgpack}/index.ts +69 -66
  50. package/src/status-codes.ts +65 -67
  51. package/tsconfig.json +6 -11
  52. package/dist/index.d.ts.map +0 -1
  53. package/dist/json.d.ts.map +0 -1
  54. package/dist/json.js +0 -93
  55. package/dist/json.js.map +0 -1
  56. package/dist/json.mjs +0 -82
  57. package/dist/json.mjs.map +0 -1
  58. package/dist/jsonpatch.d.ts.map +0 -1
  59. package/dist/jsonpatch.js +0 -33
  60. package/dist/jsonpatch.js.map +0 -1
  61. package/dist/jsonpatch.mjs +0 -22
  62. package/dist/jsonpatch.mjs.map +0 -1
  63. package/dist/msgpack.d.ts.map +0 -1
  64. package/dist/msgpack.js +0 -50
  65. package/dist/msgpack.js.map +0 -1
  66. package/dist/msgpack.mjs +0 -39
  67. package/dist/msgpack.mjs.map +0 -1
  68. package/plugins/json/node_modules/@utiliread/http/package.json +0 -4
  69. package/plugins/json/package.json +0 -15
  70. package/plugins/json/tsconfig.json +0 -7
  71. package/plugins/jsonpatch/node_modules/@utiliread/http/package.json +0 -4
  72. package/plugins/jsonpatch/package.json +0 -16
  73. package/plugins/jsonpatch/tsconfig.json +0 -7
  74. package/plugins/msgpack/node_modules/@utiliread/http/package.json +0 -4
  75. package/plugins/msgpack/package.json +0 -16
  76. package/plugins/msgpack/tsconfig.json +0 -7
@@ -1,142 +1,138 @@
1
- import {
2
- HttpBuilder,
3
- HttpBuilderOfT,
4
- InfinitePaginationResult,
5
- PaginationResult,
6
- TypeOrMapper,
7
- getMapper,
8
- getNullableMapper,
9
- } from "@utiliread/http";
10
- import { deserialize, serialize } from "@utiliread/json";
11
-
12
- // Force declarations to be module augmentations instead of ambient module declarations
13
- // https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules
14
- export default {};
15
-
16
- // https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
17
- declare module "@utiliread/http" {
18
- interface HttpBuilder {
19
- withJson(content: any): this;
20
-
21
- expectJson<T>(
22
- typeOrMapper?: TypeOrMapper<T>
23
- ): HttpBuilderOfT<T>;
24
- expectJsonArray<T>(
25
- typeOrMapper: TypeOrMapper<T>
26
- ): HttpBuilderOfT<T[]>;
27
- expectJsonNullableArray<T>(
28
- typeOrMapper: TypeOrMapper<T>
29
- ): HttpBuilderOfT<(T | null)[]>;
30
- expectJsonPaginationResult<T>(
31
- typeOrMapper: TypeOrMapper<T>
32
- ): HttpBuilderOfT<PaginationResult<T>>;
33
- expectJsonInfinitePaginationResult<T>(
34
- typeOrMapper: TypeOrMapper<T>
35
- ): HttpBuilderOfT<InfinitePaginationResult<T>>;
36
- }
37
-
38
- interface HttpBuilderOfT<T> {
39
- withJson(content: any): this;
40
- }
41
- }
42
-
43
- HttpBuilder.prototype.withJson = function (this: HttpBuilder, content: any) {
44
- this.message.content = serialize(content);
45
- this.message.contentType = "application/json";
46
- return this;
47
- };
48
-
49
- HttpBuilderOfT.prototype.withJson = function <T>(
50
- this: HttpBuilderOfT<T>,
51
- content: any
52
- ) {
53
- this.message.content = serialize(content);
54
- this.message.contentType = "application/json";
55
- return this;
56
- };
57
-
58
- HttpBuilder.prototype.expectJson = function <T>(
59
- this: HttpBuilder,
60
- typeOrMapper?: TypeOrMapper<T>
61
- ) {
62
- this.message.headers.set("Accept", "application/json");
63
- return this.useHandler((response) => {
64
- const promise = response.rawResponse
65
- .json()
66
- .then((x) => getMapper(deserialize, typeOrMapper)(x));
67
- return promise;
68
- });
69
- };
70
-
71
- HttpBuilder.prototype.expectJsonArray = function <T>(
72
- this: HttpBuilder,
73
- typeOrMapper: TypeOrMapper<T>
74
- ) {
75
- this.message.headers.set("Accept", "application/json");
76
- return this.useHandler((response) => {
77
- const promise = response.rawResponse.json().then((x: any[]) => {
78
- const itemFactory = getMapper(deserialize, typeOrMapper);
79
- return x.map(itemFactory);
80
- });
81
- return promise;
82
- });
83
- };
84
-
85
- HttpBuilder.prototype.expectJsonNullableArray = function <T>(
86
- this: HttpBuilder,
87
- typeOrMapper: TypeOrMapper<T>
88
- ): HttpBuilderOfT<(T | null)[]> {
89
- this.message.headers.set("Accept", "application/json");
90
- return this.useHandler((response) => {
91
- const promise = response.rawResponse.json().then((x: any[]) => {
92
- const itemFactory = getNullableMapper(deserialize, typeOrMapper);
93
- return x.map(itemFactory);
94
- });
95
- return promise;
96
- });
97
- };
98
-
99
- HttpBuilder.prototype.expectJsonPaginationResult = function <T>(
100
- this: HttpBuilder,
101
- typeOrMapper: TypeOrMapper<T>
102
- ) {
103
- this.message.headers.set("Accept", "application/json");
104
- return this.useHandler((response) => {
105
- const promise = response.rawResponse
106
- .json()
107
- .then((x: PaginationResult<any>) => {
108
- const itemFactory = getMapper(deserialize, typeOrMapper);
109
- return {
110
- meta: {
111
- pageCount: x.meta.pageCount,
112
- pageSize: x.meta.pageSize,
113
- totalItems: x.meta.totalItems,
114
- },
115
- data: x.data.map(itemFactory),
116
- };
117
- });
118
- return promise;
119
- });
120
- };
121
-
122
- HttpBuilder.prototype.expectJsonInfinitePaginationResult = function <T>(
123
- this: HttpBuilder,
124
- typeOrMapper: TypeOrMapper<T>
125
- ) {
126
- this.message.headers.set("Accept", "application/json");
127
- return this.useHandler((response) => {
128
- const promise = response.rawResponse
129
- .json()
130
- .then((x: InfinitePaginationResult<any>) => {
131
- const itemFactory = getMapper(deserialize, typeOrMapper);
132
- return {
133
- meta: {
134
- pageSize: x.meta.pageSize,
135
- continuationToken: x.meta.continuationToken,
136
- },
137
- data: x.data.map(itemFactory),
138
- };
139
- });
140
- return promise;
141
- });
142
- };
1
+ import {
2
+ HttpBuilder,
3
+ HttpBuilderOfT,
4
+ InfinitePaginationResult,
5
+ PaginationResult,
6
+ TypeOrMapper,
7
+ getMapper,
8
+ getNullableMapper,
9
+ } from "@utiliread/http";
10
+ import { deserialize, serialize } from "@utiliread/json";
11
+
12
+ // Force declarations to be module augmentations instead of ambient module declarations
13
+ // https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules
14
+ export default {};
15
+
16
+ // https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
17
+ declare module "@utiliread/http" {
18
+ interface HttpBuilder {
19
+ withJson(content: any): this;
20
+
21
+ expectJson<T>(typeOrMapper?: TypeOrMapper<T>): HttpBuilderOfT<T>;
22
+ expectJsonArray<T>(typeOrMapper: TypeOrMapper<T>): HttpBuilderOfT<T[]>;
23
+ expectJsonNullableArray<T>(
24
+ typeOrMapper: TypeOrMapper<T>,
25
+ ): HttpBuilderOfT<(T | null)[]>;
26
+ expectJsonPaginationResult<T>(
27
+ typeOrMapper: TypeOrMapper<T>,
28
+ ): HttpBuilderOfT<PaginationResult<T>>;
29
+ expectJsonInfinitePaginationResult<T>(
30
+ typeOrMapper: TypeOrMapper<T>,
31
+ ): HttpBuilderOfT<InfinitePaginationResult<T>>;
32
+ }
33
+
34
+ interface HttpBuilderOfT<T> {
35
+ withJson(content: any): this;
36
+ }
37
+ }
38
+
39
+ HttpBuilder.prototype.withJson = function (this: HttpBuilder, content: any) {
40
+ this.message.content = serialize(content);
41
+ this.message.contentType = "application/json";
42
+ return this;
43
+ };
44
+
45
+ HttpBuilderOfT.prototype.withJson = function <T>(
46
+ this: HttpBuilderOfT<T>,
47
+ content: any,
48
+ ) {
49
+ this.message.content = serialize(content);
50
+ this.message.contentType = "application/json";
51
+ return this;
52
+ };
53
+
54
+ HttpBuilder.prototype.expectJson = function <T>(
55
+ this: HttpBuilder,
56
+ typeOrMapper?: TypeOrMapper<T>,
57
+ ) {
58
+ this.message.headers.set("Accept", "application/json");
59
+ return this.useHandler((response) => {
60
+ const promise = response.rawResponse
61
+ .json()
62
+ .then((x) => getMapper(deserialize, typeOrMapper)(x));
63
+ return promise;
64
+ });
65
+ };
66
+
67
+ HttpBuilder.prototype.expectJsonArray = function <T>(
68
+ this: HttpBuilder,
69
+ typeOrMapper: TypeOrMapper<T>,
70
+ ) {
71
+ this.message.headers.set("Accept", "application/json");
72
+ return this.useHandler((response) => {
73
+ const promise = response.rawResponse.json().then((x: any[]) => {
74
+ const itemFactory = getMapper(deserialize, typeOrMapper);
75
+ return x.map(itemFactory);
76
+ });
77
+ return promise;
78
+ });
79
+ };
80
+
81
+ HttpBuilder.prototype.expectJsonNullableArray = function <T>(
82
+ this: HttpBuilder,
83
+ typeOrMapper: TypeOrMapper<T>,
84
+ ): HttpBuilderOfT<(T | null)[]> {
85
+ this.message.headers.set("Accept", "application/json");
86
+ return this.useHandler((response) => {
87
+ const promise = response.rawResponse.json().then((x: any[]) => {
88
+ const itemFactory = getNullableMapper(deserialize, typeOrMapper);
89
+ return x.map(itemFactory);
90
+ });
91
+ return promise;
92
+ });
93
+ };
94
+
95
+ HttpBuilder.prototype.expectJsonPaginationResult = function <T>(
96
+ this: HttpBuilder,
97
+ typeOrMapper: TypeOrMapper<T>,
98
+ ) {
99
+ this.message.headers.set("Accept", "application/json");
100
+ return this.useHandler((response) => {
101
+ const promise = response.rawResponse
102
+ .json()
103
+ .then((x: PaginationResult<any>) => {
104
+ const itemFactory = getMapper(deserialize, typeOrMapper);
105
+ return {
106
+ meta: {
107
+ pageCount: x.meta.pageCount,
108
+ pageSize: x.meta.pageSize,
109
+ totalItems: x.meta.totalItems,
110
+ },
111
+ data: x.data.map(itemFactory),
112
+ };
113
+ });
114
+ return promise;
115
+ });
116
+ };
117
+
118
+ HttpBuilder.prototype.expectJsonInfinitePaginationResult = function <T>(
119
+ this: HttpBuilder,
120
+ typeOrMapper: TypeOrMapper<T>,
121
+ ) {
122
+ this.message.headers.set("Accept", "application/json");
123
+ return this.useHandler((response) => {
124
+ const promise = response.rawResponse
125
+ .json()
126
+ .then((x: InfinitePaginationResult<any>) => {
127
+ const itemFactory = getMapper(deserialize, typeOrMapper);
128
+ return {
129
+ meta: {
130
+ pageSize: x.meta.pageSize,
131
+ continuationToken: x.meta.continuationToken,
132
+ },
133
+ data: x.data.map(itemFactory),
134
+ };
135
+ });
136
+ return promise;
137
+ });
138
+ };
@@ -1,36 +1,36 @@
1
- import { HttpBuilder, HttpBuilderOfT } from "@utiliread/http";
2
-
3
- import { serialize } from "@utiliread/json";
4
-
5
- // Force declarations to be module augmentations instead of ambient module declarations
6
- // https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules
7
- export default {};
8
-
9
- // https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
10
- declare module "@utiliread/http" {
11
- interface HttpBuilder {
12
- withJsonPatch(operations: import("@utiliread/jsonpatch").Operation[]): this;
13
- }
14
-
15
- interface HttpBuilderOfT<T> {
16
- withJsonPatch(operations: import("@utiliread/jsonpatch").Operation[]): this;
17
- }
18
- }
19
-
20
- HttpBuilder.prototype.withJsonPatch = function (
21
- this: HttpBuilder,
22
- operations: import("@utiliread/jsonpatch").Operation[]
23
- ) {
24
- this.message.content = serialize(operations);
25
- this.message.contentType = "application/json-patch+json";
26
- return this;
27
- };
28
-
29
- HttpBuilderOfT.prototype.withJsonPatch = function <T>(
30
- this: HttpBuilderOfT<T>,
31
- operations: import("@utiliread/jsonpatch").Operation[]
32
- ) {
33
- this.message.content = serialize(operations);
34
- this.message.contentType = "application/json-patch+json";
35
- return this;
36
- };
1
+ import { HttpBuilder, HttpBuilderOfT } from "@utiliread/http";
2
+
3
+ import { serialize } from "@utiliread/json";
4
+
5
+ // Force declarations to be module augmentations instead of ambient module declarations
6
+ // https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules
7
+ export default {};
8
+
9
+ // https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
10
+ declare module "@utiliread/http" {
11
+ interface HttpBuilder {
12
+ withJsonPatch(operations: import("@utiliread/jsonpatch").Operation[]): this;
13
+ }
14
+
15
+ interface HttpBuilderOfT<T> {
16
+ withJsonPatch(operations: import("@utiliread/jsonpatch").Operation[]): this;
17
+ }
18
+ }
19
+
20
+ HttpBuilder.prototype.withJsonPatch = function (
21
+ this: HttpBuilder,
22
+ operations: import("@utiliread/jsonpatch").Operation[],
23
+ ) {
24
+ this.message.content = serialize(operations);
25
+ this.message.contentType = "application/json-patch+json";
26
+ return this;
27
+ };
28
+
29
+ HttpBuilderOfT.prototype.withJsonPatch = function <T>(
30
+ this: HttpBuilderOfT<T>,
31
+ operations: import("@utiliread/jsonpatch").Operation[],
32
+ ) {
33
+ this.message.content = serialize(operations);
34
+ this.message.contentType = "application/json-patch+json";
35
+ return this;
36
+ };
@@ -1,66 +1,69 @@
1
- import { HttpBuilder, HttpResponse, TypeOrMapper, getMapper } from "@utiliread/http";
2
- import { decodeArrayStream, decodeAsync } from "@msgpack/msgpack";
3
-
4
- import { deserialize } from "@utiliread/msgpack";
5
-
6
- // Force declarations to be module augmentations instead of ambient module declarations
7
- // https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules
8
- export default {};
9
-
10
- // https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
11
- declare module "@utiliread/http" {
12
- interface HttpBuilder {
13
- expectMessagePack<T>(
14
- typeOrMapper?: TypeOrMapper<T>
15
- ): HttpBuilderOfT<T>;
16
- expectMessagePackArray<T>(
17
- typeOrMapper?: TypeOrMapper<T>
18
- ): HttpBuilderOfT<T[]>;
19
- streamMessagePackArray<T>(
20
- typeOrMapper?: TypeOrMapper<T>
21
- ): HttpBuilderOfT<AsyncGenerator<T, void, unknown>>;
22
- }
23
- }
24
-
25
- HttpBuilder.prototype.expectMessagePack = function <T>(
26
- this: HttpBuilder,
27
- typeOrMapper?: TypeOrMapper<T>
28
- ) {
29
- this.message.headers.set("Accept", "application/x-msgpack");
30
- return this.useHandler(async (response) => {
31
- const itemFactory = getMapper(deserialize, typeOrMapper);
32
- const decoded = await decodeAsync(response.rawResponse.body!);
33
- return itemFactory(decoded);
34
- });
35
- };
36
-
37
- HttpBuilder.prototype.expectMessagePackArray = function <T>(
38
- this: HttpBuilder,
39
- typeOrMapper?: TypeOrMapper<T>
40
- ) {
41
- this.message.headers.set("Accept", "application/x-msgpack");
42
- return this.useHandler(async (response) => {
43
- const items: T[] = [];
44
- const itemFactory = getMapper(deserialize, typeOrMapper);
45
- for await (const item of decodeArrayStream(response.rawResponse.body!)) {
46
- items.push(itemFactory(item));
47
- }
48
- return items;
49
- });
50
- };
51
-
52
- HttpBuilder.prototype.streamMessagePackArray = function <T>(
53
- this: HttpBuilder,
54
- typeOrMapper?: TypeOrMapper<T>
55
- ) {
56
- this.message.headers.set("Accept", "application/x-msgpack");
57
-
58
- async function* handler(response: HttpResponse) {
59
- const itemFactory = getMapper(deserialize, typeOrMapper);
60
- for await (const item of decodeArrayStream(response.rawResponse.body!)) {
61
- yield itemFactory(item);
62
- }
63
- }
64
-
65
- return this.useHandler((response) => Promise.resolve(handler(response)));
66
- };
1
+ import {
2
+ HttpBuilder,
3
+ HttpResponse,
4
+ TypeOrMapper,
5
+ getMapper,
6
+ } from "@utiliread/http";
7
+ import { decodeArrayStream, decodeAsync } from "@msgpack/msgpack";
8
+
9
+ import { deserialize } from "@utiliread/msgpack";
10
+
11
+ // Force declarations to be module augmentations instead of ambient module declarations
12
+ // https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules
13
+ export default {};
14
+
15
+ // https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
16
+ declare module "@utiliread/http" {
17
+ interface HttpBuilder {
18
+ expectMessagePack<T>(typeOrMapper?: TypeOrMapper<T>): HttpBuilderOfT<T>;
19
+ expectMessagePackArray<T>(
20
+ typeOrMapper?: TypeOrMapper<T>,
21
+ ): HttpBuilderOfT<T[]>;
22
+ streamMessagePackArray<T>(
23
+ typeOrMapper?: TypeOrMapper<T>,
24
+ ): HttpBuilderOfT<AsyncGenerator<T, void, unknown>>;
25
+ }
26
+ }
27
+
28
+ HttpBuilder.prototype.expectMessagePack = function <T>(
29
+ this: HttpBuilder,
30
+ typeOrMapper?: TypeOrMapper<T>,
31
+ ) {
32
+ this.message.headers.set("Accept", "application/x-msgpack");
33
+ return this.useHandler(async (response) => {
34
+ const itemFactory = getMapper(deserialize, typeOrMapper);
35
+ const decoded = await decodeAsync(response.rawResponse.body!);
36
+ return itemFactory(decoded);
37
+ });
38
+ };
39
+
40
+ HttpBuilder.prototype.expectMessagePackArray = function <T>(
41
+ this: HttpBuilder,
42
+ typeOrMapper?: TypeOrMapper<T>,
43
+ ) {
44
+ this.message.headers.set("Accept", "application/x-msgpack");
45
+ return this.useHandler(async (response) => {
46
+ const items: T[] = [];
47
+ const itemFactory = getMapper(deserialize, typeOrMapper);
48
+ for await (const item of decodeArrayStream(response.rawResponse.body!)) {
49
+ items.push(itemFactory(item));
50
+ }
51
+ return items;
52
+ });
53
+ };
54
+
55
+ HttpBuilder.prototype.streamMessagePackArray = function <T>(
56
+ this: HttpBuilder,
57
+ typeOrMapper?: TypeOrMapper<T>,
58
+ ) {
59
+ this.message.headers.set("Accept", "application/x-msgpack");
60
+
61
+ async function* handler(response: HttpResponse) {
62
+ const itemFactory = getMapper(deserialize, typeOrMapper);
63
+ for await (const item of decodeArrayStream(response.rawResponse.body!)) {
64
+ yield itemFactory(item);
65
+ }
66
+ }
67
+
68
+ return this.useHandler((response) => Promise.resolve(handler(response)));
69
+ };
@@ -1,67 +1,65 @@
1
- export const statusCodes = Object.freeze({
2
- status100Continue: 100,
3
- status101SwitchingProtocols: 101,
4
- status102Processing: 102,
5
- status200OK: 200,
6
- status201Created: 201,
7
- status202Accepted: 202,
8
- status203NonAuthoritative: 203,
9
- status204NoContent: 204,
10
- status205ResetContent: 205,
11
- status206PartialContent: 206,
12
- status207MultiStatus: 207,
13
- status208AlreadyReported: 208,
14
- status226IMUsed: 226,
15
- status300MultipleChoices: 300,
16
- status301MovedPermanently: 301,
17
- status302Found: 302,
18
- status303SeeOther: 303,
19
- status304NotModified: 304,
20
- status305UseProxy: 305,
21
- status306SwitchProxy: 306,
22
- status307TemporaryRedirect: 307,
23
- status308PermanentRedirect: 308,
24
- status400BadRequest: 400,
25
- status401Unauthorized: 401,
26
- status402PaymentRequired: 402,
27
- status403Forbidden: 403,
28
- status404NotFound: 404,
29
- status405MethodNotAllowed: 405,
30
- status406NotAcceptable: 406,
31
- status407ProxyAuthenticationRequired: 407,
32
- status408RequestTimeout: 408,
33
- status409Conflict: 409,
34
- status410Gone: 410,
35
- status411LengthRequired: 411,
36
- status412PreconditionFailed: 412,
37
- status413RequestEntityTooLarge: 413,
38
- status413PayloadTooLarge: 413,
39
- status414RequestUriTooLong: 414,
40
- status414UriTooLong: 414,
41
- status415UnsupportedMediaType: 415,
42
- status416RequestedRangeNotSatisfiable: 416,
43
- status416RangeNotSatisfiable: 416,
44
- status417ExpectationFailed: 417,
45
- status418ImATeapot: 418,
46
- status419AuthenticationTimeout: 419,
47
- status421MisdirectedRequest: 421,
48
- status422UnprocessableEntity: 422,
49
- status423Locked: 423,
50
- status424FailedDependency: 424,
51
- status426UpgradeRequired: 426,
52
- status428PreconditionRequired: 428,
53
- status429TooManyRequests: 429,
54
- status431RequestHeaderFieldsTooLarge: 431,
55
- status451UnavailableForLegalReasons: 451,
56
- status500InternalServerError: 500,
57
- status501NotImplemented: 501,
58
- status502BadGateway: 502,
59
- status503ServiceUnavailable: 503,
60
- status504GatewayTimeout: 504,
61
- status505HttpVersionNotsupported: 505,
62
- status506VariantAlsoNegotiates: 506,
63
- status507InsufficientStorage: 507,
64
- status508LoopDetected: 508,
65
- status510NotExtended: 510,
66
- status511NetworkAuthenticationRequired: 511,
67
- });
1
+ export const status100Continue = 100;
2
+ export const status101SwitchingProtocols = 101;
3
+ export const status102Processing = 102;
4
+ export const status200OK = 200;
5
+ export const status201Created = 201;
6
+ export const status202Accepted = 202;
7
+ export const status203NonAuthoritative = 203;
8
+ export const status204NoContent = 204;
9
+ export const status205ResetContent = 205;
10
+ export const status206PartialContent = 206;
11
+ export const status207MultiStatus = 207;
12
+ export const status208AlreadyReported = 208;
13
+ export const status226IMUsed = 226;
14
+ export const status300MultipleChoices = 300;
15
+ export const status301MovedPermanently = 301;
16
+ export const status302Found = 302;
17
+ export const status303SeeOther = 303;
18
+ export const status304NotModified = 304;
19
+ export const status305UseProxy = 305;
20
+ export const status306SwitchProxy = 306;
21
+ export const status307TemporaryRedirect = 307;
22
+ export const status308PermanentRedirect = 308;
23
+ export const status400BadRequest = 400;
24
+ export const status401Unauthorized = 401;
25
+ export const status402PaymentRequired = 402;
26
+ export const status403Forbidden = 403;
27
+ export const status404NotFound = 404;
28
+ export const status405MethodNotAllowed = 405;
29
+ export const status406NotAcceptable = 406;
30
+ export const status407ProxyAuthenticationRequired = 407;
31
+ export const status408RequestTimeout = 408;
32
+ export const status409Conflict = 409;
33
+ export const status410Gone = 410;
34
+ export const status411LengthRequired = 411;
35
+ export const status412PreconditionFailed = 412;
36
+ export const status413RequestEntityTooLarge = 413;
37
+ export const status413PayloadTooLarge = 413;
38
+ export const status414RequestUriTooLong = 414;
39
+ export const status414UriTooLong = 414;
40
+ export const status415UnsupportedMediaType = 415;
41
+ export const status416RequestedRangeNotSatisfiable = 416;
42
+ export const status416RangeNotSatisfiable = 416;
43
+ export const status417ExpectationFailed = 417;
44
+ export const status418ImATeapot = 418;
45
+ export const status419AuthenticationTimeout = 419;
46
+ export const status421MisdirectedRequest = 421;
47
+ export const status422UnprocessableEntity = 422;
48
+ export const status423Locked = 423;
49
+ export const status424FailedDependency = 424;
50
+ export const status426UpgradeRequired = 426;
51
+ export const status428PreconditionRequired = 428;
52
+ export const status429TooManyRequests = 429;
53
+ export const status431RequestHeaderFieldsTooLarge = 431;
54
+ export const status451UnavailableForLegalReasons = 451;
55
+ export const status500InternalServerError = 500;
56
+ export const status501NotImplemented = 501;
57
+ export const status502BadGateway = 502;
58
+ export const status503ServiceUnavailable = 503;
59
+ export const status504GatewayTimeout = 504;
60
+ export const status505HttpVersionNotsupported = 505;
61
+ export const status506VariantAlsoNegotiates = 506;
62
+ export const status507InsufficientStorage = 507;
63
+ export const status508LoopDetected = 508;
64
+ export const status510NotExtended = 510;
65
+ export const status511NetworkAuthenticationRequired = 511;