MCPcopy
hub / github.com/psf/requests / head

Function head

src/requests/api.py:102–114  ·  view source on GitHub ↗

r"""Sends a HEAD request. :param url: URL for the new :class:`Request` object. :param \*\*kwargs: Optional arguments that ``request`` takes. If `allow_redirects` is not provided, it will be set to `False` (as opposed to the default :meth:`request` behavior). :return: :cl

(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs])

Source from the content-addressed store, hash-verified

100
101
102def head(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response:
103 r"""Sends a HEAD request.
104
105 :param url: URL for the new :class:`Request` object.
106 :param \*\*kwargs: Optional arguments that ``request`` takes. If
107 `allow_redirects` is not provided, it will be set to `False` (as
108 opposed to the default :meth:`request` behavior).
109 :return: :class:`Response <Response>` object
110 :rtype: requests.Response
111 """
112
113 kwargs.setdefault("allow_redirects", False)
114 return request("head", url, **kwargs)
115
116
117def post(

Callers

nothing calls this directly

Calls 1

requestFunction · 0.85

Tested by

no test coverage detected