@@ -65,15 +65,15 @@ def with_timeout(self, timeout: httpx2.Timeout) -> "Client":
6565 self ._async_client .timeout = timeout
6666 return evolve (self , timeout = timeout )
6767
68- def set_httpx2_client (self , client : httpx2 .Client ) -> Self :
68+ def set_httpx_client (self , client : httpx2 .Client ) -> Self :
6969 """Manually set the underlying httpx2.Client
7070
7171 **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
7272 """
7373 self ._client = client
7474 return self
7575
76- def get_httpx2_client (self ) -> httpx2 .Client :
76+ def get_httpx_client (self ) -> httpx2 .Client :
7777 """Get the underlying httpx2.Client, constructing a new one if not previously set"""
7878 if self ._client is None :
7979 self ._client = httpx2 .Client (
@@ -89,22 +89,22 @@ def get_httpx2_client(self) -> httpx2.Client:
8989
9090 def __enter__ (self ) -> Self :
9191 """Enter a context manager for self.client—you cannot enter twice (see httpx2 docs)"""
92- self .get_httpx2_client ().__enter__ ()
92+ self .get_httpx_client ().__enter__ ()
9393 return self
9494
9595 def __exit__ (self , * args : Any , ** kwargs : Any ) -> None :
9696 """Exit a context manager for internal httpx2.Client (see httpx2 docs)"""
97- self .get_httpx2_client ().__exit__ (* args , ** kwargs )
97+ self .get_httpx_client ().__exit__ (* args , ** kwargs )
9898
99- def set_async_httpx2_client (self , async_client : httpx2 .AsyncClient ) -> Self :
99+ def set_async_httpx_client (self , async_client : httpx2 .AsyncClient ) -> Self :
100100 """Manually set the underlying httpx2.AsyncClient
101101
102102 **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
103103 """
104104 self ._async_client = async_client
105105 return self
106106
107- def get_async_httpx2_client (self ) -> httpx2 .AsyncClient :
107+ def get_async_httpx_client (self ) -> httpx2 .AsyncClient :
108108 """Get the underlying httpx2.AsyncClient, constructing a new one if not previously set"""
109109 if self ._async_client is None :
110110 self ._async_client = httpx2 .AsyncClient (
@@ -120,12 +120,12 @@ def get_async_httpx2_client(self) -> httpx2.AsyncClient:
120120
121121 async def __aenter__ (self ) -> Self :
122122 """Enter a context manager for underlying httpx2.AsyncClient—you cannot enter twice (see httpx2 docs)"""
123- await self .get_async_httpx2_client ().__aenter__ ()
123+ await self .get_async_httpx_client ().__aenter__ ()
124124 return self
125125
126126 async def __aexit__ (self , * args : Any , ** kwargs : Any ) -> None :
127127 """Exit a context manager for underlying httpx2.AsyncClient (see httpx2 docs)"""
128- await self .get_async_httpx2_client ().__aexit__ (* args , ** kwargs )
128+ await self .get_async_httpx_client ().__aexit__ (* args , ** kwargs )
129129
130130
131131@define
@@ -195,15 +195,15 @@ def with_timeout(self, timeout: httpx2.Timeout) -> "AuthenticatedClient":
195195 self ._async_client .timeout = timeout
196196 return evolve (self , timeout = timeout )
197197
198- def set_httpx2_client (self , client : httpx2 .Client ) -> Self :
198+ def set_httpx_client (self , client : httpx2 .Client ) -> Self :
199199 """Manually set the underlying httpx2.Client
200200
201201 **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
202202 """
203203 self ._client = client
204204 return self
205205
206- def get_httpx2_client (self ) -> httpx2 .Client :
206+ def get_httpx_client (self ) -> httpx2 .Client :
207207 """Get the underlying httpx2.Client, constructing a new one if not previously set"""
208208 if self ._client is None :
209209 self ._headers [self .auth_header_name ] = f"{ self .prefix } { self .token } " if self .prefix else self .token
@@ -220,22 +220,22 @@ def get_httpx2_client(self) -> httpx2.Client:
220220
221221 def __enter__ (self ) -> Self :
222222 """Enter a context manager for self.client—you cannot enter twice (see httpx2 docs)"""
223- self .get_httpx2_client ().__enter__ ()
223+ self .get_httpx_client ().__enter__ ()
224224 return self
225225
226226 def __exit__ (self , * args : Any , ** kwargs : Any ) -> None :
227227 """Exit a context manager for internal httpx2.Client (see httpx2 docs)"""
228- self .get_httpx2_client ().__exit__ (* args , ** kwargs )
228+ self .get_httpx_client ().__exit__ (* args , ** kwargs )
229229
230- def set_async_httpx2_client (self , async_client : httpx2 .AsyncClient ) -> Self :
230+ def set_async_httpx_client (self , async_client : httpx2 .AsyncClient ) -> Self :
231231 """Manually set the underlying httpx2.AsyncClient
232232
233233 **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
234234 """
235235 self ._async_client = async_client
236236 return self
237237
238- def get_async_httpx2_client (self ) -> httpx2 .AsyncClient :
238+ def get_async_httpx_client (self ) -> httpx2 .AsyncClient :
239239 """Get the underlying httpx2.AsyncClient, constructing a new one if not previously set"""
240240 if self ._async_client is None :
241241 self ._headers [self .auth_header_name ] = f"{ self .prefix } { self .token } " if self .prefix else self .token
@@ -252,9 +252,9 @@ def get_async_httpx2_client(self) -> httpx2.AsyncClient:
252252
253253 async def __aenter__ (self ) -> Self :
254254 """Enter a context manager for underlying httpx2.AsyncClient—you cannot enter twice (see httpx2 docs)"""
255- await self .get_async_httpx2_client ().__aenter__ ()
255+ await self .get_async_httpx_client ().__aenter__ ()
256256 return self
257257
258258 async def __aexit__ (self , * args : Any , ** kwargs : Any ) -> None :
259259 """Exit a context manager for underlying httpx2.AsyncClient (see httpx2 docs)"""
260- await self .get_async_httpx2_client ().__aexit__ (* args , ** kwargs )
260+ await self .get_async_httpx_client ().__aexit__ (* args , ** kwargs )
0 commit comments