links() function insufficient for attributes other than `rel`
Open
4.x
5.x
enhancement
- Dominant language
- JavaScript
- Stars
- 69.5k
- Forks
- 25k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
With [v4 `links()` function](http://expressjs.com/4x/api.html#res.links) it is not possible to set the [`type` attribute](http://tools.ietf.org/html/rfc5988#section-5.4), inter alia.
I propose that an interface variant is added where the function takes an array of objects, e.g.:
``` javascript
res.links([
{
href: 'http://api.example.com/users?page=2',
rel: 'next',
title: 'next chapter',
type: 'text/plain;charset=UTF-8'
},
{
href: 'http://api.example.com/users?page=5',
rel: 'last',
title: 'the grand finale',
type: 'video/webm'
}
]);
```
Contributor guide
Assessment
This issue has not been assessed yet.