File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,11 +56,7 @@ client = AuthenticatedClient(
5656You can also disable certificate validation altogether, but beware that ** this is a security risk** .
5757
5858``` python
59- client = AuthenticatedClient(
60- base_url = " https://internal_api.example.com" ,
61- token = " SuperSecretToken" ,
62- verify_ssl = False
63- )
59+ client = AuthenticatedClient(base_url = " https://internal_api.example.com" , token = " SuperSecretToken" , verify_ssl = False )
6460```
6561
6662Things to know:
@@ -81,13 +77,16 @@ There are more settings on the generated `Client` class which let you control mo
8177``` python
8278from integration_tests import Client
8379
80+
8481def log_request (request ):
8582 print (f " Request event hook: { request.method} { request.url} - Waiting for response " )
8683
84+
8785def log_response (response ):
8886 request = response.request
8987 print (f " Response event hook: { request.method} { request.url} - Status { response.status_code} " )
9088
89+
9190client = Client(
9291 base_url = " https://api.example.com" ,
9392 httpx2_args = {" event_hooks" : {" request" : [log_request], " response" : [log_response]}},
You can’t perform that action at this time.
0 commit comments