Edit Page

res.set()

Sets specified response header (header) to the specified value (value).

Alternatively, you can pass in a single object argument (headers) to set multiple header fields at once, where the keys are the header field names and the corresponding values are the desired values.

Usage

res.set(header, value);

-or-

res.set(headers);

Example

res.set('Content-Type', 'text/plain');
res.set({
 'Content-Type': 'text/plain',
 'Content-Length': '123',
 'ETag': '12345'
})

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Check out the official Sails VS Code extension

Documentation

Reference

Sails logo

Reference

AltStyle によって変換されたページ (->オリジナル) /