@alterior/http 3.13.3 → 3.13.4
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.
- package/dist/backend.d.ts +38 -38
- package/dist/backend.js +38 -38
- package/dist/client.d.ts +2108 -2108
- package/dist/client.js +265 -265
- package/dist/client.js.map +1 -1
- package/dist/headers.d.ts +57 -57
- package/dist/headers.js +187 -187
- package/dist/headers.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +42 -42
- package/dist/interceptor.d.ts +63 -63
- package/dist/interceptor.js +43 -43
- package/dist/interceptor.js.map +1 -1
- package/dist/module.d.ts +101 -101
- package/dist/module.js +188 -188
- package/dist/module.js.map +1 -1
- package/dist/params.d.ts +98 -98
- package/dist/params.js +184 -184
- package/dist/params.js.map +1 -1
- package/dist/request.d.ts +130 -130
- package/dist/request.js +260 -260
- package/dist/request.js.map +1 -1
- package/dist/response.d.ts +267 -267
- package/dist/response.js +165 -165
- package/dist/response.js.map +1 -1
- package/dist/server.d.ts +28 -28
- package/dist/server.js +119 -119
- package/dist/server.js.map +1 -1
- package/dist/test/client.test.d.ts +8 -8
- package/dist/test/client.test.js +163 -163
- package/dist/test/client.test.js.map +1 -1
- package/dist/test/headers.test.d.ts +1 -1
- package/dist/test/headers.test.js +126 -126
- package/dist/test/module.test.d.ts +1 -1
- package/dist/test/module.test.js +117 -117
- package/dist/test/module.test.js.map +1 -1
- package/dist/test/params.test.d.ts +1 -1
- package/dist/test/params.test.js +63 -63
- package/dist/test/request.test.d.ts +8 -8
- package/dist/test/request.test.js +159 -159
- package/dist/test/request.test.js.map +1 -1
- package/dist/test/response.test.d.ts +1 -1
- package/dist/test/response.test.js +79 -79
- package/dist/test/response.test.js.map +1 -1
- package/dist/test/test.d.ts +1 -1
- package/dist/test/test.js +16 -16
- package/dist/test/xhr.mock.d.ts +48 -48
- package/dist/test/xhr.mock.js +94 -94
- package/dist/test/xhr.mock.js.map +1 -1
- package/dist/test/xhr.test.d.ts +1 -1
- package/dist/test/xhr.test.js +344 -344
- package/dist/test/xhr.test.js.map +1 -1
- package/dist/test/xsrf.test.d.ts +1 -1
- package/dist/test/xsrf.test.js +63 -63
- package/dist/test/xsrf.test.js.map +1 -1
- package/dist/testing/api.d.ts +102 -102
- package/dist/testing/api.js +19 -19
- package/dist/testing/backend.d.ts +63 -63
- package/dist/testing/backend.js +141 -141
- package/dist/testing/backend.js.map +1 -1
- package/dist/testing/index.d.ts +10 -10
- package/dist/testing/index.js +16 -16
- package/dist/testing/module.d.ts +16 -16
- package/dist/testing/module.js +38 -38
- package/dist/testing/module.js.map +1 -1
- package/dist/testing/request.d.ts +56 -56
- package/dist/testing/request.js +177 -177
- package/dist/testing/request.js.map +1 -1
- package/dist/testing/request.test.d.ts +8 -8
- package/dist/testing/request.test.js +24 -24
- package/dist/xhr.d.ts +42 -42
- package/dist/xhr.js +298 -298
- package/dist/xhr.js.map +1 -1
- package/dist/xsrf.d.ts +37 -37
- package/dist/xsrf.js +55 -55
- package/dist/xsrf.js.map +1 -1
- package/dist.esm/backend.d.ts +38 -38
- package/dist.esm/backend.js +33 -33
- package/dist.esm/client.d.ts +2108 -2108
- package/dist.esm/client.js +262 -262
- package/dist.esm/client.js.map +1 -1
- package/dist.esm/headers.d.ts +57 -57
- package/dist.esm/headers.js +183 -183
- package/dist.esm/headers.js.map +1 -1
- package/dist.esm/index.d.ts +18 -18
- package/dist.esm/index.js +18 -18
- package/dist.esm/interceptor.d.ts +63 -63
- package/dist.esm/interceptor.js +39 -39
- package/dist.esm/interceptor.js.map +1 -1
- package/dist.esm/module.d.ts +101 -101
- package/dist.esm/module.js +183 -183
- package/dist.esm/module.js.map +1 -1
- package/dist.esm/params.d.ts +98 -98
- package/dist.esm/params.js +179 -179
- package/dist.esm/params.js.map +1 -1
- package/dist.esm/request.d.ts +130 -130
- package/dist.esm/request.js +256 -256
- package/dist.esm/request.js.map +1 -1
- package/dist.esm/response.d.ts +267 -267
- package/dist.esm/response.js +158 -158
- package/dist.esm/response.js.map +1 -1
- package/dist.esm/server.d.ts +28 -28
- package/dist.esm/server.js +113 -113
- package/dist.esm/server.js.map +1 -1
- package/dist.esm/test/client.test.d.ts +8 -8
- package/dist.esm/test/client.test.js +161 -161
- package/dist.esm/test/client.test.js.map +1 -1
- package/dist.esm/test/headers.test.d.ts +1 -1
- package/dist.esm/test/headers.test.js +124 -124
- package/dist.esm/test/module.test.d.ts +1 -1
- package/dist.esm/test/module.test.js +115 -115
- package/dist.esm/test/module.test.js.map +1 -1
- package/dist.esm/test/params.test.d.ts +1 -1
- package/dist.esm/test/params.test.js +61 -61
- package/dist.esm/test/request.test.d.ts +8 -8
- package/dist.esm/test/request.test.js +157 -157
- package/dist.esm/test/request.test.js.map +1 -1
- package/dist.esm/test/response.test.d.ts +1 -1
- package/dist.esm/test/response.test.js +77 -77
- package/dist.esm/test/response.test.js.map +1 -1
- package/dist.esm/test/test.d.ts +1 -1
- package/dist.esm/test/test.js +14 -14
- package/dist.esm/test/xhr.mock.d.ts +48 -48
- package/dist.esm/test/xhr.mock.js +88 -88
- package/dist.esm/test/xhr.mock.js.map +1 -1
- package/dist.esm/test/xhr.test.d.ts +1 -1
- package/dist.esm/test/xhr.test.js +342 -342
- package/dist.esm/test/xhr.test.js.map +1 -1
- package/dist.esm/test/xsrf.test.d.ts +1 -1
- package/dist.esm/test/xsrf.test.js +61 -61
- package/dist.esm/test/xsrf.test.js.map +1 -1
- package/dist.esm/testing/api.d.ts +102 -102
- package/dist.esm/testing/api.js +15 -15
- package/dist.esm/testing/backend.d.ts +63 -63
- package/dist.esm/testing/backend.js +138 -138
- package/dist.esm/testing/backend.js.map +1 -1
- package/dist.esm/testing/index.d.ts +10 -10
- package/dist.esm/testing/index.js +10 -10
- package/dist.esm/testing/module.d.ts +16 -16
- package/dist.esm/testing/module.js +35 -35
- package/dist.esm/testing/module.js.map +1 -1
- package/dist.esm/testing/request.d.ts +56 -56
- package/dist.esm/testing/request.js +173 -173
- package/dist.esm/testing/request.js.map +1 -1
- package/dist.esm/testing/request.test.d.ts +8 -8
- package/dist.esm/testing/request.test.js +22 -22
- package/dist.esm/xhr.d.ts +42 -42
- package/dist.esm/xhr.js +294 -294
- package/dist.esm/xhr.js.map +1 -1
- package/dist.esm/xsrf.d.ts +37 -37
- package/dist.esm/xsrf.js +51 -51
- package/dist.esm/xsrf.js.map +1 -1
- package/package.json +9 -9
- package/tsconfig.esm.tsbuildinfo +1 -0
- package/tsconfig.json +0 -2
- package/tsconfig.tsbuildinfo +1 -8046
package/dist/headers.d.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Immutable set of Http headers, with lazy parsing.
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
export declare class HttpHeaders {
|
|
13
|
-
/**
|
|
14
|
-
* Internal map of lowercase header names to values.
|
|
15
|
-
*/
|
|
16
|
-
private headers;
|
|
17
|
-
/**
|
|
18
|
-
* Internal map of lowercased header names to the normalized
|
|
19
|
-
* form of the name (the form seen first).
|
|
20
|
-
*/
|
|
21
|
-
private normalizedNames;
|
|
22
|
-
/**
|
|
23
|
-
* Complete the lazy initialization of this object (needed before reading).
|
|
24
|
-
*/
|
|
25
|
-
private lazyInit;
|
|
26
|
-
/**
|
|
27
|
-
* Queued updates to be materialized the next initialization.
|
|
28
|
-
*/
|
|
29
|
-
private lazyUpdate;
|
|
30
|
-
constructor(headers?: string | {
|
|
31
|
-
[name: string]: string | string[];
|
|
32
|
-
});
|
|
33
|
-
/**
|
|
34
|
-
* Checks for existence of header by given name.
|
|
35
|
-
*/
|
|
36
|
-
has(name: string): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Returns first header that matches given name.
|
|
39
|
-
*/
|
|
40
|
-
get(name: string): string | null;
|
|
41
|
-
/**
|
|
42
|
-
* Returns the names of the headers
|
|
43
|
-
*/
|
|
44
|
-
keys(): string[];
|
|
45
|
-
/**
|
|
46
|
-
* Returns list of header values for a given name.
|
|
47
|
-
*/
|
|
48
|
-
getAll(name: string): string[] | null;
|
|
49
|
-
append(name: string, value: string | string[]): HttpHeaders;
|
|
50
|
-
set(name: string, value: string | string[]): HttpHeaders;
|
|
51
|
-
delete(name: string, value?: string | string[]): HttpHeaders;
|
|
52
|
-
private maybeSetNormalizedName;
|
|
53
|
-
private init;
|
|
54
|
-
private copyFrom;
|
|
55
|
-
private clone;
|
|
56
|
-
private applyUpdate;
|
|
57
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Immutable set of Http headers, with lazy parsing.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export declare class HttpHeaders {
|
|
13
|
+
/**
|
|
14
|
+
* Internal map of lowercase header names to values.
|
|
15
|
+
*/
|
|
16
|
+
private headers;
|
|
17
|
+
/**
|
|
18
|
+
* Internal map of lowercased header names to the normalized
|
|
19
|
+
* form of the name (the form seen first).
|
|
20
|
+
*/
|
|
21
|
+
private normalizedNames;
|
|
22
|
+
/**
|
|
23
|
+
* Complete the lazy initialization of this object (needed before reading).
|
|
24
|
+
*/
|
|
25
|
+
private lazyInit;
|
|
26
|
+
/**
|
|
27
|
+
* Queued updates to be materialized the next initialization.
|
|
28
|
+
*/
|
|
29
|
+
private lazyUpdate;
|
|
30
|
+
constructor(headers?: string | {
|
|
31
|
+
[name: string]: string | string[];
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Checks for existence of header by given name.
|
|
35
|
+
*/
|
|
36
|
+
has(name: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Returns first header that matches given name.
|
|
39
|
+
*/
|
|
40
|
+
get(name: string): string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the names of the headers
|
|
43
|
+
*/
|
|
44
|
+
keys(): string[];
|
|
45
|
+
/**
|
|
46
|
+
* Returns list of header values for a given name.
|
|
47
|
+
*/
|
|
48
|
+
getAll(name: string): string[] | null;
|
|
49
|
+
append(name: string, value: string | string[]): HttpHeaders;
|
|
50
|
+
set(name: string, value: string | string[]): HttpHeaders;
|
|
51
|
+
delete(name: string, value?: string | string[]): HttpHeaders;
|
|
52
|
+
private maybeSetNormalizedName;
|
|
53
|
+
private init;
|
|
54
|
+
private copyFrom;
|
|
55
|
+
private clone;
|
|
56
|
+
private applyUpdate;
|
|
57
|
+
}
|
|
58
58
|
//# sourceMappingURL=headers.d.ts.map
|
package/dist/headers.js
CHANGED
|
@@ -1,188 +1,188 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
5
|
-
*
|
|
6
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.io/license
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.HttpHeaders = void 0;
|
|
11
|
-
/**
|
|
12
|
-
* Immutable set of Http headers, with lazy parsing.
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
class HttpHeaders {
|
|
16
|
-
constructor(headers) {
|
|
17
|
-
/**
|
|
18
|
-
* Internal map of lowercased header names to the normalized
|
|
19
|
-
* form of the name (the form seen first).
|
|
20
|
-
*/
|
|
21
|
-
this.normalizedNames = new Map();
|
|
22
|
-
/**
|
|
23
|
-
* Queued updates to be materialized the next initialization.
|
|
24
|
-
*/
|
|
25
|
-
this.lazyUpdate = null;
|
|
26
|
-
if (!headers) {
|
|
27
|
-
this.headers = new Map();
|
|
28
|
-
}
|
|
29
|
-
else if (typeof headers === 'string') {
|
|
30
|
-
this.lazyInit = () => {
|
|
31
|
-
this.headers = new Map();
|
|
32
|
-
headers.split('\n').forEach(line => {
|
|
33
|
-
const index = line.indexOf(':');
|
|
34
|
-
if (index > 0) {
|
|
35
|
-
const name = line.slice(0, index);
|
|
36
|
-
const key = name.toLowerCase();
|
|
37
|
-
const value = line.slice(index + 1).trim();
|
|
38
|
-
this.maybeSetNormalizedName(name, key);
|
|
39
|
-
if (this.headers.has(key)) {
|
|
40
|
-
this.headers.get(key).push(value);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
this.headers.set(key, [value]);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this.lazyInit = () => {
|
|
51
|
-
this.headers = new Map();
|
|
52
|
-
Object.keys(headers).forEach(name => {
|
|
53
|
-
let values = headers[name];
|
|
54
|
-
const key = name.toLowerCase();
|
|
55
|
-
if (typeof values === 'string') {
|
|
56
|
-
values = [values];
|
|
57
|
-
}
|
|
58
|
-
if (values.length > 0) {
|
|
59
|
-
this.headers.set(key, values);
|
|
60
|
-
this.maybeSetNormalizedName(name, key);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Checks for existence of header by given name.
|
|
68
|
-
*/
|
|
69
|
-
has(name) {
|
|
70
|
-
this.init();
|
|
71
|
-
return this.headers.has(name.toLowerCase());
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Returns first header that matches given name.
|
|
75
|
-
*/
|
|
76
|
-
get(name) {
|
|
77
|
-
this.init();
|
|
78
|
-
const values = this.headers.get(name.toLowerCase());
|
|
79
|
-
return values && values.length > 0 ? values[0] : null;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Returns the names of the headers
|
|
83
|
-
*/
|
|
84
|
-
keys() {
|
|
85
|
-
this.init();
|
|
86
|
-
return Array.from(this.normalizedNames.values());
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Returns list of header values for a given name.
|
|
90
|
-
*/
|
|
91
|
-
getAll(name) {
|
|
92
|
-
this.init();
|
|
93
|
-
return this.headers.get(name.toLowerCase()) || null;
|
|
94
|
-
}
|
|
95
|
-
append(name, value) {
|
|
96
|
-
return this.clone({ name, value, op: 'a' });
|
|
97
|
-
}
|
|
98
|
-
set(name, value) {
|
|
99
|
-
return this.clone({ name, value, op: 's' });
|
|
100
|
-
}
|
|
101
|
-
delete(name, value) {
|
|
102
|
-
return this.clone({ name, value, op: 'd' });
|
|
103
|
-
}
|
|
104
|
-
maybeSetNormalizedName(name, lcName) {
|
|
105
|
-
if (!this.normalizedNames.has(lcName)) {
|
|
106
|
-
this.normalizedNames.set(lcName, name);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
init() {
|
|
110
|
-
if (!!this.lazyInit) {
|
|
111
|
-
if (this.lazyInit instanceof HttpHeaders) {
|
|
112
|
-
this.copyFrom(this.lazyInit);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
this.lazyInit();
|
|
116
|
-
}
|
|
117
|
-
this.lazyInit = null;
|
|
118
|
-
if (!!this.lazyUpdate) {
|
|
119
|
-
this.lazyUpdate.forEach(update => this.applyUpdate(update));
|
|
120
|
-
this.lazyUpdate = null;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
copyFrom(other) {
|
|
125
|
-
other.init();
|
|
126
|
-
Array.from(other.headers.keys()).forEach(key => {
|
|
127
|
-
this.headers.set(key, other.headers.get(key));
|
|
128
|
-
this.normalizedNames.set(key, other.normalizedNames.get(key));
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
clone(update) {
|
|
132
|
-
const clone = new HttpHeaders();
|
|
133
|
-
clone.lazyInit =
|
|
134
|
-
(!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;
|
|
135
|
-
clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);
|
|
136
|
-
return clone;
|
|
137
|
-
}
|
|
138
|
-
applyUpdate(update) {
|
|
139
|
-
const key = update.name.toLowerCase();
|
|
140
|
-
switch (update.op) {
|
|
141
|
-
case 'a':
|
|
142
|
-
case 's':
|
|
143
|
-
let value = update.value;
|
|
144
|
-
if (typeof value === 'string') {
|
|
145
|
-
value = [value];
|
|
146
|
-
}
|
|
147
|
-
if (value.length === 0) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
this.maybeSetNormalizedName(update.name, key);
|
|
151
|
-
const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];
|
|
152
|
-
base.push(...value);
|
|
153
|
-
this.headers.set(key, base);
|
|
154
|
-
break;
|
|
155
|
-
case 'd':
|
|
156
|
-
const toDelete = update.value;
|
|
157
|
-
if (!toDelete) {
|
|
158
|
-
this.headers.delete(key);
|
|
159
|
-
this.normalizedNames.delete(key);
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
let existing = this.headers.get(key);
|
|
163
|
-
if (!existing) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
existing = existing.filter(value => toDelete.indexOf(value) === -1);
|
|
167
|
-
if (existing.length === 0) {
|
|
168
|
-
this.headers.delete(key);
|
|
169
|
-
this.normalizedNames.delete(key);
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
this.headers.set(key, existing);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* @internal
|
|
180
|
-
*/
|
|
181
|
-
forEach(fn) {
|
|
182
|
-
this.init();
|
|
183
|
-
Array.from(this.normalizedNames.keys())
|
|
184
|
-
.forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key)));
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
exports.HttpHeaders = HttpHeaders;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.HttpHeaders = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* Immutable set of Http headers, with lazy parsing.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
class HttpHeaders {
|
|
16
|
+
constructor(headers) {
|
|
17
|
+
/**
|
|
18
|
+
* Internal map of lowercased header names to the normalized
|
|
19
|
+
* form of the name (the form seen first).
|
|
20
|
+
*/
|
|
21
|
+
this.normalizedNames = new Map();
|
|
22
|
+
/**
|
|
23
|
+
* Queued updates to be materialized the next initialization.
|
|
24
|
+
*/
|
|
25
|
+
this.lazyUpdate = null;
|
|
26
|
+
if (!headers) {
|
|
27
|
+
this.headers = new Map();
|
|
28
|
+
}
|
|
29
|
+
else if (typeof headers === 'string') {
|
|
30
|
+
this.lazyInit = () => {
|
|
31
|
+
this.headers = new Map();
|
|
32
|
+
headers.split('\n').forEach(line => {
|
|
33
|
+
const index = line.indexOf(':');
|
|
34
|
+
if (index > 0) {
|
|
35
|
+
const name = line.slice(0, index);
|
|
36
|
+
const key = name.toLowerCase();
|
|
37
|
+
const value = line.slice(index + 1).trim();
|
|
38
|
+
this.maybeSetNormalizedName(name, key);
|
|
39
|
+
if (this.headers.has(key)) {
|
|
40
|
+
this.headers.get(key).push(value);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.headers.set(key, [value]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.lazyInit = () => {
|
|
51
|
+
this.headers = new Map();
|
|
52
|
+
Object.keys(headers).forEach(name => {
|
|
53
|
+
let values = headers[name];
|
|
54
|
+
const key = name.toLowerCase();
|
|
55
|
+
if (typeof values === 'string') {
|
|
56
|
+
values = [values];
|
|
57
|
+
}
|
|
58
|
+
if (values.length > 0) {
|
|
59
|
+
this.headers.set(key, values);
|
|
60
|
+
this.maybeSetNormalizedName(name, key);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Checks for existence of header by given name.
|
|
68
|
+
*/
|
|
69
|
+
has(name) {
|
|
70
|
+
this.init();
|
|
71
|
+
return this.headers.has(name.toLowerCase());
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Returns first header that matches given name.
|
|
75
|
+
*/
|
|
76
|
+
get(name) {
|
|
77
|
+
this.init();
|
|
78
|
+
const values = this.headers.get(name.toLowerCase());
|
|
79
|
+
return values && values.length > 0 ? values[0] : null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Returns the names of the headers
|
|
83
|
+
*/
|
|
84
|
+
keys() {
|
|
85
|
+
this.init();
|
|
86
|
+
return Array.from(this.normalizedNames.values());
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Returns list of header values for a given name.
|
|
90
|
+
*/
|
|
91
|
+
getAll(name) {
|
|
92
|
+
this.init();
|
|
93
|
+
return this.headers.get(name.toLowerCase()) || null;
|
|
94
|
+
}
|
|
95
|
+
append(name, value) {
|
|
96
|
+
return this.clone({ name, value, op: 'a' });
|
|
97
|
+
}
|
|
98
|
+
set(name, value) {
|
|
99
|
+
return this.clone({ name, value, op: 's' });
|
|
100
|
+
}
|
|
101
|
+
delete(name, value) {
|
|
102
|
+
return this.clone({ name, value, op: 'd' });
|
|
103
|
+
}
|
|
104
|
+
maybeSetNormalizedName(name, lcName) {
|
|
105
|
+
if (!this.normalizedNames.has(lcName)) {
|
|
106
|
+
this.normalizedNames.set(lcName, name);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
init() {
|
|
110
|
+
if (!!this.lazyInit) {
|
|
111
|
+
if (this.lazyInit instanceof HttpHeaders) {
|
|
112
|
+
this.copyFrom(this.lazyInit);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
this.lazyInit();
|
|
116
|
+
}
|
|
117
|
+
this.lazyInit = null;
|
|
118
|
+
if (!!this.lazyUpdate) {
|
|
119
|
+
this.lazyUpdate.forEach(update => this.applyUpdate(update));
|
|
120
|
+
this.lazyUpdate = null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
copyFrom(other) {
|
|
125
|
+
other.init();
|
|
126
|
+
Array.from(other.headers.keys()).forEach(key => {
|
|
127
|
+
this.headers.set(key, other.headers.get(key));
|
|
128
|
+
this.normalizedNames.set(key, other.normalizedNames.get(key));
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
clone(update) {
|
|
132
|
+
const clone = new HttpHeaders();
|
|
133
|
+
clone.lazyInit =
|
|
134
|
+
(!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;
|
|
135
|
+
clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);
|
|
136
|
+
return clone;
|
|
137
|
+
}
|
|
138
|
+
applyUpdate(update) {
|
|
139
|
+
const key = update.name.toLowerCase();
|
|
140
|
+
switch (update.op) {
|
|
141
|
+
case 'a':
|
|
142
|
+
case 's':
|
|
143
|
+
let value = update.value;
|
|
144
|
+
if (typeof value === 'string') {
|
|
145
|
+
value = [value];
|
|
146
|
+
}
|
|
147
|
+
if (value.length === 0) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this.maybeSetNormalizedName(update.name, key);
|
|
151
|
+
const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];
|
|
152
|
+
base.push(...value);
|
|
153
|
+
this.headers.set(key, base);
|
|
154
|
+
break;
|
|
155
|
+
case 'd':
|
|
156
|
+
const toDelete = update.value;
|
|
157
|
+
if (!toDelete) {
|
|
158
|
+
this.headers.delete(key);
|
|
159
|
+
this.normalizedNames.delete(key);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
let existing = this.headers.get(key);
|
|
163
|
+
if (!existing) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
existing = existing.filter(value => toDelete.indexOf(value) === -1);
|
|
167
|
+
if (existing.length === 0) {
|
|
168
|
+
this.headers.delete(key);
|
|
169
|
+
this.normalizedNames.delete(key);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.headers.set(key, existing);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
181
|
+
forEach(fn) {
|
|
182
|
+
this.init();
|
|
183
|
+
Array.from(this.normalizedNames.keys())
|
|
184
|
+
.forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key)));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
exports.HttpHeaders = HttpHeaders;
|
|
188
188
|
//# sourceMappingURL=headers.js.map
|
package/dist/headers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headers.js","sourceRoot":"","sources":["../src/headers.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAQH;;;GAGG;AACH,MAAa,WAAW;IAyBtB,YAAY,OAAoD;QAjBhE;;;WAGG;QACK,oBAAe,GAAwB,IAAI,GAAG,EAAE,CAAC;QAQzD;;WAEG;QACK,eAAU,GAAkB,IAAI,CAAC;QAGvC,IAAI,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"headers.js","sourceRoot":"","sources":["../src/headers.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;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,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;wBAC1B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;wBACzB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBACnC,CAAC;yBAAM,CAAC;wBACN,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;oBAClC,CAAC;gBACH,CAAC;gBACD,MAAM;QACV,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,EAA4C;QAClD,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;aAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAG,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAG,CAAC,CAAC,CAAC;IACpF,CAAC;CACF;AArMD,kCAqMC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
export { HttpBackend, HttpHandler } from './backend';
|
|
9
|
-
export { HttpClient } from './client';
|
|
10
|
-
export { HttpHeaders } from './headers';
|
|
11
|
-
export { HTTP_INTERCEPTORS, HttpInterceptor } from './interceptor';
|
|
12
|
-
export { HttpClientModule, HttpClientXsrfModule, HttpInterceptingHandler as ɵHttpInterceptingHandler } from './module';
|
|
13
|
-
export { HttpParameterCodec, HttpParams, HttpUrlEncodingCodec } from './params';
|
|
14
|
-
export { HttpRequest } from './request';
|
|
15
|
-
export { HttpDownloadProgressEvent, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpResponseBase, HttpSentEvent, HttpUserEvent } from './response';
|
|
16
|
-
export { HttpXhrBackend, XhrFactory } from './xhr';
|
|
17
|
-
export { HttpXsrfTokenExtractor } from './xsrf';
|
|
18
|
-
export { ServerXhr, zoneWrappedInterceptingHandler } from './server';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
export { HttpBackend, HttpHandler } from './backend';
|
|
9
|
+
export { HttpClient } from './client';
|
|
10
|
+
export { HttpHeaders } from './headers';
|
|
11
|
+
export { HTTP_INTERCEPTORS, HttpInterceptor } from './interceptor';
|
|
12
|
+
export { HttpClientModule, HttpClientXsrfModule, HttpInterceptingHandler as ɵHttpInterceptingHandler } from './module';
|
|
13
|
+
export { HttpParameterCodec, HttpParams, HttpUrlEncodingCodec } from './params';
|
|
14
|
+
export { HttpRequest } from './request';
|
|
15
|
+
export { HttpDownloadProgressEvent, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpResponseBase, HttpSentEvent, HttpUserEvent } from './response';
|
|
16
|
+
export { HttpXhrBackend, XhrFactory } from './xhr';
|
|
17
|
+
export { HttpXsrfTokenExtractor } from './xsrf';
|
|
18
|
+
export { ServerXhr, zoneWrappedInterceptingHandler } from './server';
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
5
|
-
*
|
|
6
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.io/license
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.zoneWrappedInterceptingHandler = exports.ServerXhr = exports.HttpXsrfTokenExtractor = exports.XhrFactory = exports.HttpXhrBackend = exports.HttpResponseBase = exports.HttpResponse = exports.HttpHeaderResponse = exports.HttpEventType = exports.HttpErrorResponse = exports.HttpRequest = exports.HttpUrlEncodingCodec = exports.HttpParams = exports.ɵHttpInterceptingHandler = exports.HttpClientXsrfModule = exports.HttpClientModule = exports.HTTP_INTERCEPTORS = exports.HttpHeaders = exports.HttpClient = exports.HttpHandler = exports.HttpBackend = void 0;
|
|
11
|
-
var backend_1 = require("./backend");
|
|
12
|
-
Object.defineProperty(exports, "HttpBackend", { enumerable: true, get: function () { return backend_1.HttpBackend; } });
|
|
13
|
-
Object.defineProperty(exports, "HttpHandler", { enumerable: true, get: function () { return backend_1.HttpHandler; } });
|
|
14
|
-
var client_1 = require("./client");
|
|
15
|
-
Object.defineProperty(exports, "HttpClient", { enumerable: true, get: function () { return client_1.HttpClient; } });
|
|
16
|
-
var headers_1 = require("./headers");
|
|
17
|
-
Object.defineProperty(exports, "HttpHeaders", { enumerable: true, get: function () { return headers_1.HttpHeaders; } });
|
|
18
|
-
var interceptor_1 = require("./interceptor");
|
|
19
|
-
Object.defineProperty(exports, "HTTP_INTERCEPTORS", { enumerable: true, get: function () { return interceptor_1.HTTP_INTERCEPTORS; } });
|
|
20
|
-
var module_1 = require("./module");
|
|
21
|
-
Object.defineProperty(exports, "HttpClientModule", { enumerable: true, get: function () { return module_1.HttpClientModule; } });
|
|
22
|
-
Object.defineProperty(exports, "HttpClientXsrfModule", { enumerable: true, get: function () { return module_1.HttpClientXsrfModule; } });
|
|
23
|
-
Object.defineProperty(exports, "\u0275HttpInterceptingHandler", { enumerable: true, get: function () { return module_1.HttpInterceptingHandler; } });
|
|
24
|
-
var params_1 = require("./params");
|
|
25
|
-
Object.defineProperty(exports, "HttpParams", { enumerable: true, get: function () { return params_1.HttpParams; } });
|
|
26
|
-
Object.defineProperty(exports, "HttpUrlEncodingCodec", { enumerable: true, get: function () { return params_1.HttpUrlEncodingCodec; } });
|
|
27
|
-
var request_1 = require("./request");
|
|
28
|
-
Object.defineProperty(exports, "HttpRequest", { enumerable: true, get: function () { return request_1.HttpRequest; } });
|
|
29
|
-
var response_1 = require("./response");
|
|
30
|
-
Object.defineProperty(exports, "HttpErrorResponse", { enumerable: true, get: function () { return response_1.HttpErrorResponse; } });
|
|
31
|
-
Object.defineProperty(exports, "HttpEventType", { enumerable: true, get: function () { return response_1.HttpEventType; } });
|
|
32
|
-
Object.defineProperty(exports, "HttpHeaderResponse", { enumerable: true, get: function () { return response_1.HttpHeaderResponse; } });
|
|
33
|
-
Object.defineProperty(exports, "HttpResponse", { enumerable: true, get: function () { return response_1.HttpResponse; } });
|
|
34
|
-
Object.defineProperty(exports, "HttpResponseBase", { enumerable: true, get: function () { return response_1.HttpResponseBase; } });
|
|
35
|
-
var xhr_1 = require("./xhr");
|
|
36
|
-
Object.defineProperty(exports, "HttpXhrBackend", { enumerable: true, get: function () { return xhr_1.HttpXhrBackend; } });
|
|
37
|
-
Object.defineProperty(exports, "XhrFactory", { enumerable: true, get: function () { return xhr_1.XhrFactory; } });
|
|
38
|
-
var xsrf_1 = require("./xsrf");
|
|
39
|
-
Object.defineProperty(exports, "HttpXsrfTokenExtractor", { enumerable: true, get: function () { return xsrf_1.HttpXsrfTokenExtractor; } });
|
|
40
|
-
var server_1 = require("./server");
|
|
41
|
-
Object.defineProperty(exports, "ServerXhr", { enumerable: true, get: function () { return server_1.ServerXhr; } });
|
|
42
|
-
Object.defineProperty(exports, "zoneWrappedInterceptingHandler", { enumerable: true, get: function () { return server_1.zoneWrappedInterceptingHandler; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.zoneWrappedInterceptingHandler = exports.ServerXhr = exports.HttpXsrfTokenExtractor = exports.XhrFactory = exports.HttpXhrBackend = exports.HttpResponseBase = exports.HttpResponse = exports.HttpHeaderResponse = exports.HttpEventType = exports.HttpErrorResponse = exports.HttpRequest = exports.HttpUrlEncodingCodec = exports.HttpParams = exports.ɵHttpInterceptingHandler = exports.HttpClientXsrfModule = exports.HttpClientModule = exports.HTTP_INTERCEPTORS = exports.HttpHeaders = exports.HttpClient = exports.HttpHandler = exports.HttpBackend = void 0;
|
|
11
|
+
var backend_1 = require("./backend");
|
|
12
|
+
Object.defineProperty(exports, "HttpBackend", { enumerable: true, get: function () { return backend_1.HttpBackend; } });
|
|
13
|
+
Object.defineProperty(exports, "HttpHandler", { enumerable: true, get: function () { return backend_1.HttpHandler; } });
|
|
14
|
+
var client_1 = require("./client");
|
|
15
|
+
Object.defineProperty(exports, "HttpClient", { enumerable: true, get: function () { return client_1.HttpClient; } });
|
|
16
|
+
var headers_1 = require("./headers");
|
|
17
|
+
Object.defineProperty(exports, "HttpHeaders", { enumerable: true, get: function () { return headers_1.HttpHeaders; } });
|
|
18
|
+
var interceptor_1 = require("./interceptor");
|
|
19
|
+
Object.defineProperty(exports, "HTTP_INTERCEPTORS", { enumerable: true, get: function () { return interceptor_1.HTTP_INTERCEPTORS; } });
|
|
20
|
+
var module_1 = require("./module");
|
|
21
|
+
Object.defineProperty(exports, "HttpClientModule", { enumerable: true, get: function () { return module_1.HttpClientModule; } });
|
|
22
|
+
Object.defineProperty(exports, "HttpClientXsrfModule", { enumerable: true, get: function () { return module_1.HttpClientXsrfModule; } });
|
|
23
|
+
Object.defineProperty(exports, "\u0275HttpInterceptingHandler", { enumerable: true, get: function () { return module_1.HttpInterceptingHandler; } });
|
|
24
|
+
var params_1 = require("./params");
|
|
25
|
+
Object.defineProperty(exports, "HttpParams", { enumerable: true, get: function () { return params_1.HttpParams; } });
|
|
26
|
+
Object.defineProperty(exports, "HttpUrlEncodingCodec", { enumerable: true, get: function () { return params_1.HttpUrlEncodingCodec; } });
|
|
27
|
+
var request_1 = require("./request");
|
|
28
|
+
Object.defineProperty(exports, "HttpRequest", { enumerable: true, get: function () { return request_1.HttpRequest; } });
|
|
29
|
+
var response_1 = require("./response");
|
|
30
|
+
Object.defineProperty(exports, "HttpErrorResponse", { enumerable: true, get: function () { return response_1.HttpErrorResponse; } });
|
|
31
|
+
Object.defineProperty(exports, "HttpEventType", { enumerable: true, get: function () { return response_1.HttpEventType; } });
|
|
32
|
+
Object.defineProperty(exports, "HttpHeaderResponse", { enumerable: true, get: function () { return response_1.HttpHeaderResponse; } });
|
|
33
|
+
Object.defineProperty(exports, "HttpResponse", { enumerable: true, get: function () { return response_1.HttpResponse; } });
|
|
34
|
+
Object.defineProperty(exports, "HttpResponseBase", { enumerable: true, get: function () { return response_1.HttpResponseBase; } });
|
|
35
|
+
var xhr_1 = require("./xhr");
|
|
36
|
+
Object.defineProperty(exports, "HttpXhrBackend", { enumerable: true, get: function () { return xhr_1.HttpXhrBackend; } });
|
|
37
|
+
Object.defineProperty(exports, "XhrFactory", { enumerable: true, get: function () { return xhr_1.XhrFactory; } });
|
|
38
|
+
var xsrf_1 = require("./xsrf");
|
|
39
|
+
Object.defineProperty(exports, "HttpXsrfTokenExtractor", { enumerable: true, get: function () { return xsrf_1.HttpXsrfTokenExtractor; } });
|
|
40
|
+
var server_1 = require("./server");
|
|
41
|
+
Object.defineProperty(exports, "ServerXhr", { enumerable: true, get: function () { return server_1.ServerXhr; } });
|
|
42
|
+
Object.defineProperty(exports, "zoneWrappedInterceptingHandler", { enumerable: true, get: function () { return server_1.zoneWrappedInterceptingHandler; } });
|
|
43
43
|
//# sourceMappingURL=index.js.map
|