#35414: Issue with AsyncClient ignoring default headers compared to synchronous
Client
-------------------------------------+-------------------------------------
     Reporter:  설원준(Wonjoon       |                    Owner:  nobody
  Seol)/Dispatch squad               |
         Type:  Bug                  |                   Status:  closed
    Component:  HTTP handling        |                  Version:  5.0
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  AsyncClient,         |             Triage Stage:
  ASGIRequest                        |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

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

Comment:

 This works as expected and
 
[https://docs.djangoproject.com/en/5.0/topics/testing/tools/#django.test.AsyncClient
 documented]:

 ''"In the initialization, arbitrary keyword arguments in defaults are
 added directly into the ASGI scope."''

 If you want to add default headers you should pass them in the `headers`
 arguments.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35414#comment:8>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018f43224466-413e4f5d-61cd-4086-abda-0342e36607e4-000000%40eu-central-1.amazonses.com.

Reply via email to