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

Function options

httpx/_api.py:210–243  ·  view source on GitHub ↗

Sends an `OPTIONS` request. **Parameters**: See `httpx.request`. Note that the `data`, `files`, `json` and `content` parameters are not available on this function, as `OPTIONS` requests should not include a request body.

(
    url: URL | str,
    *,
    params: QueryParamTypes | None = None,
    headers: HeaderTypes | None = None,
    cookies: CookieTypes | None = None,
    auth: AuthTypes | None = None,
    proxy: ProxyTypes | None = None,
    follow_redirects: bool = False,
    verify: ssl.SSLContext | str | bool = True,
    timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
    trust_env: bool = True,
)

Source from the content-addressed store, hash-verified

208
209
210def options(
211 url: URL | str,
212 *,
213 params: QueryParamTypes | None = None,
214 headers: HeaderTypes | None = None,
215 cookies: CookieTypes | None = None,
216 auth: AuthTypes | None = None,
217 proxy: ProxyTypes | None = None,
218 follow_redirects: bool = False,
219 verify: ssl.SSLContext | str | bool = True,
220 timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
221 trust_env: bool = True,
222) -> Response:
223 """
224 Sends an `OPTIONS` request.
225
226 **Parameters**: See `httpx.request`.
227
228 Note that the `data`, `files`, `json` and `content` parameters are not available
229 on this function, as `OPTIONS` requests should not include a request body.
230 """
231 return request(
232 "OPTIONS",
233 url,
234 params=params,
235 headers=headers,
236 cookies=cookies,
237 auth=auth,
238 proxy=proxy,
239 follow_redirects=follow_redirects,
240 verify=verify,
241 timeout=timeout,
242 trust_env=trust_env,
243 )
244
245
246def head(

Callers

nothing calls this directly

Calls 1

requestFunction · 0.85

Tested by

no test coverage detected