| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 93c9402 commit 77d6bfd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -979,6 +979,17 @@ or | |||
| 979 | 979 | request.setHeader('Cookie', ['type=ninja', 'language=javascript']); | |
| 980 | 980 | ``` | |
| 981 | 981 | ||
| 982 | + When the value is a string an exception will be thrown if it contains | ||
| 983 | + characters outside the `latin1` encoding. | ||
| 984 | + | ||
| 985 | + If you need to pass UTF-8 characters in the value please encode the value | ||
| 986 | + using the [RFC 8187][] standard. | ||
| 987 | + | ||
| 988 | + ```js | ||
| 989 | + const filename = 'Rock 🎵.txt'; | ||
| 990 | + request.setHeader('Content-Disposition', `attachment; filename*=utf-8''${encodeURIComponent(filename)}`); | ||
| 991 | + ``` | ||
| 992 | + | ||
| 982 | 993 | ### `request.setNoDelay([noDelay])` | |
| 983 | 994 | ||
| 984 | 995 | <!-- YAML | |
@@ -3387,6 +3398,7 @@ try { | |||
| 3387 | 3398 | } | |
| 3388 | 3399 | ``` | |
| 3389 | 3400 | ||
| 3401 | + [RFC 8187]: https://www.rfc-editor.org/rfc/rfc8187.txt | ||
| 3390 | 3402 | [`'checkContinue'`]: #event-checkcontinue | |
| 3391 | 3403 | [`'finish'`]: #event-finish | |
| 3392 | 3404 | [`'request'`]: #event-request | |
| Back | FazBrowse Home | New Git URL |
0 commit comments