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

Function post

src/requests/api.py:117–134  ·  view source on GitHub ↗

r"""Sends a POST request. :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) A JSON serializable Python object to send in the bod

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

Source from the content-addressed store, hash-verified

115
116
117def post(
118 url: _t.UriType,
119 data: _t.DataType = None,
120 json: _t.JsonType = None,
121 **kwargs: Unpack[_t.PostKwargs],
122) -> Response:
123 r"""Sends a POST request.
124
125 :param url: URL for the new :class:`Request` object.
126 :param data: (optional) Dictionary, list of tuples, bytes, or file-like
127 object to send in the body of the :class:`Request`.
128 :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
129 :param \*\*kwargs: Optional arguments that ``request`` takes.
130 :return: :class:`Response <Response>` object
131 :rtype: requests.Response
132 """
133
134 return request("post", url, data=data, json=json, **kwargs)
135
136
137def put(

Callers

nothing calls this directly

Calls 1

requestFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…