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: packages/headers/CHANGELOG.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Similarly, the constructor no longer accepts non-string values in an array init
27
27
let headers =newSuperHeaders([['Content-Type', { mediaType: 'text/html' }]]);
28
28
29
29
// if you need the previous behavior, use the object init instead
30
-
let headers =newSuperHeaders({ contentType: 'text/html' });
30
+
let headers =newSuperHeaders({ contentType: { mediaType: 'text/html' } });
31
31
```
32
32
33
33
- BREAKING CHANGE: `headers.get()` returns `null` for uninitialized custom header values instead of `undefined`. This follows the native `Headers` interface more closely.
@@ -43,7 +43,7 @@ headers.get('Host'); // null
43
43
headers.get('Content-Type'); // null
44
44
```
45
45
46
-
- BREAKING CHANGE: Removed ability to initialize `AcceptLanguage` with `undefined`quality values.
46
+
- BREAKING CHANGE: Removed ability to initialize `AcceptLanguage` with `undefined`weight values.
47
47
48
48
```ts
49
49
// before
@@ -65,11 +65,12 @@ headers.contentType = null; // same as headers.delete('Content-Type');
65
65
headers.contentType; // null
66
66
```
67
67
68
-
- Allow setting date values (`date`, `expires`, `ifModifiedSince`, `ifUnmodifiedSince`, and `lastModified`) using numbers.
68
+
- Allow setting date headers (`date`, `expires`, `ifModifiedSince`, `ifUnmodifiedSince`, and `lastModified`) using numbers.
69
69
70
70
```ts
71
71
let ms =newDate().getTime();
72
72
let headers =newSuperHeaders({ lastModified: ms });
0 commit comments