This is kind of an experimental approach. Shouldn't merge this until it
had some more testing (and is fully covered with unittests).
The goal of this feature is to have a unified way to access Web Links
via a simple API, whether that's links in a HTTP Link header, or
embedded in a body.
If links are embedded in a body, middlewares should be written to
automatically read and/or write them.
Sample usage:
const link = ctx.request.links.get('author');
ctx.response.links.set({
rel: 'author',
href: 'https://evertpot.com/',
type: 'text/html',
position: 'header', // or body
});
Right now I'm just looking for some feedback about this specific approach.
This is kind of an experimental approach. Shouldn't merge this until it had some more testing (and is fully covered with unittests).
The goal of this feature is to have a unified way to access Web Links via a simple API, whether that's links in a HTTP Link header, or embedded in a body.
If links are embedded in a body, middlewares should be written to automatically read and/or write them.
Sample usage:
Right now I'm just looking for some feedback about this specific approach.