I think this is a good starting point. What do we think about adding a
“accepts_json” helper of some kind? It seems that the vast, vast majority of
usages I can find of “is_ajax” is to return a JSON response, which I feel could
be served nicely with a helper. There are also, annoyingly, two diff
I'm afraid that implementing a whole content negociation framework is a bit
ambitious, unless someone has much time to devote to that.
We could start smaller, similar to django-accept-header. I quickly sketched
what it could look like in:
https://github.com/django/django/compare/master...claudep
any plan with
https://github.com/django/deps/blob/master/draft/content-negotiation.rst
one?
On Sunday, November 17, 2019 at 2:00:26 PM UTC+6, Adam Johnson wrote:
>
> Right - Flask's error message also points to something I was mistaken
> about. XMLHttpRequest does not set this header. jQuery ad
Hi.
I would be really favorable suggested approach which would open up more
possibilities to responses. And in general sounds good direction.
su 17. marrask. 2019 klo 10.00 Adam Johnson kirjoitti:
> Right - Flask's error message also points to something I was mistaken
> about. XMLHttpRequest do
Right - Flask's error message also points to something I was mistaken
about. XMLHttpRequest does not set this header. jQuery adds it (
https://api.jquery.com/jquery.ajax/#jQuery-ajax-settings ), and presumably
some other JS libraries.
In my opinion there are not many good reasons to have to change