MCPcopy
hub / github.com/encode/httpx / auth_flow

Method auth_flow

httpx/_auth.py:38–60  ·  view source on GitHub ↗

Execute the authentication flow. To dispatch a request, `yield` it: ``` yield request ``` The client will `.send()` the response back into the flow generator. You can access it like so: ``` response = yield request

(self, request: Request)

Source from the content-addressed store, hash-verified

36 requires_response_body = False
37
38 def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]:
39 """
40 Execute the authentication flow.
41
42 To dispatch a request, `yield` it:
43
44 ```
45 yield request
46 ```
47
48 The client will `.send()` the response back into the flow generator. You can
49 access it like so:
50
51 ```
52 response = yield request
53 ```
54
55 A `return` (or reaching the end of the generator) will result in the
56 client returning the last response obtained from the server.
57
58 You can dispatch as many requests as is necessary.
59 """
60 yield request
61
62 def sync_auth_flow(
63 self, request: Request

Callers 2

sync_auth_flowMethod · 0.95
async_auth_flowMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected