Why are the links in JSON-API responses absolute, I would have thought links relative to the api would be appropriate. An example is featured below.
{
"links": {
"self": "http://localhost:4200/api/v0/blog-posts?size=10",
"first": "http://localhost:4200/api/v0/blog-posts?size=10&page=0",
"last": "http://localhost:4200/api/v0/blog-posts?size=10&page=1",
"next": "http://localhost:4200/api/v0/blog-posts?size=10&page=1"
},
...
}
Why is it not like this?
{
"links": {
"self": "/blog-posts?size=10",
"first": "/blog-posts?size=10&page=0",
"last": "/blog-posts?size=10&page=1",
"next": "/blog-posts?size=10&page=1"
},
...
}
Aucun commentaire:
Enregistrer un commentaire