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

Method post

src/requests/sessions.py:695–712  ·  view source on GitHub ↗

r"""Sends a POST request. Returns :class:`Response` object. :param url: URL for the new :class:`Request` object. :param data: (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the :class:`Request`. :param json: (optional) js

(
        self,
        url: _t.UriType,
        data: _t.DataType = None,
        json: _t.JsonType = None,
        **kwargs: Unpack[_t.PostKwargs],
    )

Source from the content-addressed store, hash-verified

693 return self.request("HEAD", url, **kwargs)
694
695 def post(
696 self,
697 url: _t.UriType,
698 data: _t.DataType = None,
699 json: _t.JsonType = None,
700 **kwargs: Unpack[_t.PostKwargs],
701 ) -> Response:
702 r"""Sends a POST request. Returns :class:`Response` object.
703
704 :param url: URL for the new :class:`Request` object.
705 :param data: (optional) Dictionary, list of tuples, bytes, or file-like
706 object to send in the body of the :class:`Request`.
707 :param json: (optional) json to send in the body of the :class:`Request`.
708 :param \*\*kwargs: Optional arguments that ``request`` takes.
709 :rtype: requests.Response
710 """
711
712 return self.request("POST", url, data=data, json=json, **kwargs)
713
714 def put(
715 self, url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs]

Calls 1

requestMethod · 0.95