#35310: Optimize automatic JSON encoding of data in test client
-------------------------------------+-------------------------------------
               Reporter:  Kasun      |          Owner:  Kasun Herath
  Herath                             |
                   Type:             |         Status:  assigned
  Cleanup/optimization               |
              Component:  Testing    |        Version:  dev
  framework                          |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Test client post, put, patch and delete methods automatically encode
 request data to JSON if `content_type` parameter is set to
 `application/data`.

 Example
 {{{
 client.post(url, data=data, content_type="application/json")
 }}}
 Would automatically encode data as JSON.

 We could also check the headers for content_type header and do the
 automatic encoding to be consistent.

 example
 {{{
 client.post(url, data=data, headers={"content_type": "application/json"})
 }}}

 Can automatically encode data into JSON using the same mechanism.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35310>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e45ed21ff-d3f5f0ea-c395-44b8-a1f6-82a685606bed-000000%40eu-central-1.amazonses.com.

Reply via email to