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

Function head

httpx/_api.py:246–279  ·  view source on GitHub ↗

Sends a `HEAD` request. **Parameters**: See `httpx.request`. Note that the `data`, `files`, `json` and `content` parameters are not available on this function, as `HEAD` 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

244
245
246def head(
247 url: URL | str,
248 *,
249 params: QueryParamTypes | None = None,
250 headers: HeaderTypes | None = None,
251 cookies: CookieTypes | None = None,
252 auth: AuthTypes | None = None,
253 proxy: ProxyTypes | None = None,
254 follow_redirects: bool = False,
255 verify: ssl.SSLContext | str | bool = True,
256 timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
257 trust_env: bool = True,
258) -> Response:
259 """
260 Sends a `HEAD` request.
261
262 **Parameters**: See `httpx.request`.
263
264 Note that the `data`, `files`, `json` and `content` parameters are not available
265 on this function, as `HEAD` requests should not include a request body.
266 """
267 return request(
268 "HEAD",
269 url,
270 params=params,
271 headers=headers,
272 cookies=cookies,
273 auth=auth,
274 proxy=proxy,
275 follow_redirects=follow_redirects,
276 verify=verify,
277 timeout=timeout,
278 trust_env=trust_env,
279 )
280
281
282def post(

Callers

nothing calls this directly

Calls 1

requestFunction · 0.85

Tested by

no test coverage detected