File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 987
987
request .setHeader (' Cookie' , [' type=ninja' , ' language=javascript' ]);
988
988
```
989
989
990
+ When the value is a string an exception will be thrown if it contains
991
+ characters outside the ` latin1 ` encoding.
992
+
993
+ If you need to pass UTF-8 characters in the value please encode the value
994
+ using the [ RFC 8187] [ ] standard.
995
+
996
+ ``` js
997
+ const filename = ' Rock 🎵.txt' ;
998
+ request .setHeader (' Content-Disposition' , ` attachment; filename*=utf-8''${ encodeURIComponent (filename)} ` );
999
+ ```
1000
+
990
1001
### ` request.setNoDelay([noDelay]) `
991
1002
992
1003
<!-- YAML
@@ -3406,6 +3417,7 @@ try {
3406
3417
}
3407
3418
```
3408
3419
3420
+ [ RFC 8187 ] : https://www.rfc-editor.org/rfc/rfc8187.txt
3409
3421
[ `'checkContinue'` ] : #event-checkcontinue
3410
3422
[ `'finish'` ] : #event-finish
3411
3423
[ `'request'` ] : #event-request
You can’t perform that action at this time.
0 commit comments