I have a page on website with many filters/settings, all of them are stored in JSON object. And this page is displaying live data, so performance is important.
Currently I'm sending POST request to fetch data, but I know it's not the best solution and breaking REST principles.
So there is pros and cons for both solutions:
GET
Pros:
- Can use cache (good for performance, which is important)
- Good with REST
- Clear for user, he can see all of his settings directly in the url.
Cons:
- With so much filters and settings final url can become very long, that's not what I want and I think that's a bad for users.
POST
Pros:
- Clean url, no distracting users
- I can just do
queryset.filter(**request.data.items()), It's not really safe tho.
Cons:
- Can't use caching