MCPcopy
hub / github.com/openai/openai-python / _prepare_request

Method _prepare_request

src/openai/_base_client.py:946–955  ·  view source on GitHub ↗

This method is used as a callback for mutating the `Request` object after it has been constructed. This is useful for cases where you want to add certain headers based off of the request properties, e.g. `url`, `method` etc.

(
        self,
        request: httpx.Request,  # noqa: ARG002
    )

Source from the content-addressed store, hash-verified

944 return options
945
946 def _prepare_request(
947 self,
948 request: httpx.Request, # noqa: ARG002
949 ) -> None:
950 """This method is used as a callback for mutating the `Request` object
951 after it has been constructed.
952 This is useful for cases where you want to add certain headers based off of
953 the request properties, e.g. `url`, `method` etc.
954 """
955 return None
956
957 def _send_request(
958 self,

Callers 1

requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected