@@ -335,6 +335,41 @@ with client.customers.with_streaming_response.create(
335335
336336The context manager is required so that the response will reliably be closed.
337337
338+ ### Making custom/undocumented requests
339+
340+ This library is typed for convenient access the documented API.
341+
342+ If you need to access undocumented endpoints, params, or response properties, the library can still be used.
343+
344+ #### Undocumented endpoints
345+
346+ To make requests to undocumented endpoints, you can make requests using ` client.get ` , ` client.post ` , and other
347+ http verbs. Options on the client will be respected (such as retries) will be respected when making this
348+ request.
349+
350+ ``` py
351+ import httpx
352+
353+ response = client.post(
354+ " /foo" ,
355+ cast_to = httpx.Response,
356+ body = {" my_param" : True },
357+ )
358+
359+ print (response.headers.get(" x-foo" ))
360+ ```
361+
362+ #### Undocumented params
363+
364+ If you want to explicitly send an extra param, you can do so with the ` extra_query ` , ` extra_body ` , and ` extra_headers ` request
365+ options.
366+
367+ #### Undocumented properties
368+
369+ To access undocumented response properties, you can access the extra fields like ` response.unknown_prop ` . You
370+ can also get all the extra fields on the Pydantic model as a dict with
371+ [ ` response.model_extra ` ] ( https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra ) .
372+
338373### Configuring the HTTP client
339374
340375You can directly override the [ httpx client] ( https://www.python-httpx.org/api/#client ) to customize it for your use case, including:
0 commit comments