Skip to content
Myr

docs for res.contentType() literal

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 1fe0aea · Browse files · 1 file+4 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:docs/guide.md+4 added
759 unmodified lines
760 var filename = 'path/to/image.png';761 res.contentType(filename);762 // Content-Type is now "image/png"763764A literal _Content-Type_ works as well:765766 res.contentType('application/json');767768### res.attachment([filename])769770Sets the _Content-Disposition_ response header to "attachment", with optional _filename_.771
415 unmodified lines