mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-21 19:41:33 +00:00
16 lines
389 B
Plaintext
16 lines
389 B
Plaintext
section
|
|
h3(id='res.set') res.set(field, [value])
|
|
p
|
|
| Set header <code>field</code> to <code>value</code>,
|
|
| or pass an object to set multiple fields at once.
|
|
|
|
+js.
|
|
res.set('Content-Type', 'text/plain');
|
|
|
|
res.set({
|
|
'Content-Type': 'text/plain',
|
|
'Content-Length': '123',
|
|
'ETag': '12345'
|
|
})
|
|
|
|
p Aliased as <code>res.header(field, [value])</code>. |