Re: [Django] #32646: add request.json() shortcut

2021-04-13 Thread Django
#32646: add request.json() shortcut
-+--
 Reporter:  Collin Anderson  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  HTTP handling|  Version:  4.0
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Collin Anderson):

 I can see the case for content negotiation.

 My two sense: In browsers, there's a standard `.json()` method for http
 responses [0], and the Python `requests` library also has `.json()`
 method, so a simple `.json()` method is becoming more of the norm for a
 lot of simple use cases.

 I don't think I'd be wrong if I said most apis only need to speak json.
 Content negotiation, while needed for some use cases, is probably overkill
 for many people's. Some people aren't going to want their endpoint to
 accept xml and yaml.

 [0] https://developer.mozilla.org/en-US/docs/Web/API/Body/json

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.69f0c8f455fbeccaab49a06387fc5054%40djangoproject.com.


Re: [Django] #32646: add request.json() shortcut

2021-04-13 Thread Django
#32646: add request.json() shortcut
-+--
 Reporter:  Collin Anderson  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  HTTP handling|  Version:  4.0
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Adam Johnson):

 There's also #21442 for Tom Christie's work.

 I think adding `request.json()` would be a bit of a mis-feature, when we
 could instead add `request.data` with a parsing framework that's more
 "future-proof". It would be based on DRF's behaviour, so would be familiar
 to most Django devs already.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.9b4aeb5aff63b16589f2362986b35c84%40djangoproject.com.


Re: [Django] #32646: add request.json() shortcut

2021-04-13 Thread Django
#32646: add request.json() shortcut
-+--
 Reporter:  Collin Anderson  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  HTTP handling|  Version:  4.0
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by Carlton Gibson):

 * cc: Adam Johnson (added)


Comment:

 I think this also relates to #32259. Completing the
 [https://github.com/django/deps/blob/main/draft/content-negotiation.rst
 content negotiation story] as suggested on #27415 would be the
 ''significant benefits'' justifying changes in #32259. 🤔

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.42957f0c3431d6ca900d3635c75265a2%40djangoproject.com.


Re: [Django] #32646: add request.json() shortcut

2021-04-13 Thread Django
#32646: add request.json() shortcut
-+--
 Reporter:  Collin Anderson  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  HTTP handling|  Version:  4.0
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 As far as I'm aware, it's a duplicate of #27415.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.a2e386034c7476995c8046ed850ba2a0%40djangoproject.com.


Re: [Django] #32646: add request.json() shortcut

2021-04-13 Thread Django
#32646: add request.json() shortcut
-+--
 Reporter:  Collin Anderson  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Collin Anderson):

 PR: https://github.com/django/django/pull/14258

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.37ffa6190c9de41d65d3479f6a55a9e3%40djangoproject.com.


[Django] #32646: add request.json() shortcut

2021-04-13 Thread Django
#32646: add request.json() shortcut
---+
   Reporter:  Collin Anderson  |  Owner:  nobody
   Type:  New feature  | Status:  new
  Component:  HTTP handling|Version:  4.0
   Severity:  Normal   |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  1
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 It would be nice to have a request.json() shortcut.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/057.6ff0bae601df3dfe85a2c0907fdf39ed%40djangoproject.com.