https://github.com/expressjs/set-type
DEPRECATED - Please use mime-types instead.
https://github.com/expressjs/set-type
Last synced: 3 months ago
JSON representation
DEPRECATED - Please use mime-types instead.
- Host: GitHub
- URL: https://github.com/expressjs/set-type
- Owner: expressjs
- License: mit
- Created: 2014-04-27T08:47:56.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-13T17:48:23.000Z (over 11 years ago)
- Last Synced: 2024-10-29T14:24:22.304Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://github.com/expressjs/mime-types
- Size: 125 KB
- Stars: 6
- Watchers: 11
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> [!CAUTION]
> **This repository is archived and no longer actively maintained.**
>
> We are no longer accepting issues, feature requests, or pull requests.
> For additional support or questions, please visit the [Express.js Discussions page](https://github.com/expressjs/express/discussions).
---
**Please use [mime-types](https://github.com/expressjs/mime-types) instead.**
---
# Set Type
Return a well-formatted content type header given an extension.
```js
var set = require('set-type')
app.use(function (req, res) {
res.setHeader('Content-Type', set('html'))
// => text/html; charset=utf-8
})
```