# requests 2.34.2 (Apache-2.0), harvested by tools/harvest_corpus.py
=== input
Constructs and sends a :class:`Request <Request>`.

    :param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary, list of tuples or bytes to send
        in the query string for the :class:`Request`.
    :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 body of the :class:`Request`.
    :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
    :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
    :param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
        ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
        or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string
        defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
        to add for the file.
    :param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
    :param timeout: (optional) How many seconds to wait for the server to send data
        before giving up, as a float, or a :ref:`(connect timeout, read
        timeout) <timeouts>` tuple.
    :type timeout: float or tuple
    :param allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.
    :type allow_redirects: bool
    :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
    :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use. Defaults to ``True``.
    :param stream: (optional) if ``False``, the response content will be immediately downloaded.
    :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response

    Usage::

      >>> import requests
      >>> req = requests.request('GET', 'https://httpbin.org/get')
      >>> req
      <Response [200]>
    
=== parse rest
short_description: 'Constructs and sends a :class:`Request <Request>`.'
long_description: |
  Usage::
  
    >>> import requests
    >>> req = requests.request('GET', 'https://httpbin.org/get')
    >>> req
    <Response [200]>
blank_after_short_description: True
blank_after_long_description: True
style: rest
- DocstringParam
  description: 'method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.'
  kind: param
  key: 'param'
  arg_name: 'method'
  is_optional: False
- DocstringParam
  description: 'URL for the new :class:`Request` object.'
  kind: param
  key: 'param'
  arg_name: 'url'
  is_optional: False
- DocstringParam
  description: |
    (optional) Dictionary, list of tuples or bytes to send
    in the query string for the :class:`Request`.
  kind: param
  key: 'param'
  arg_name: 'params'
  is_optional: False
- DocstringParam
  description: |
    (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
  kind: param
  key: 'param'
  arg_name: 'data'
  is_optional: False
- DocstringParam
  description: '(optional) A JSON serializable Python object to send in the body of the :class:`Request`.'
  kind: param
  key: 'param'
  arg_name: 'json'
  is_optional: False
- DocstringParam
  description: '(optional) Dictionary of HTTP Headers to send with the :class:`Request`.'
  kind: param
  key: 'param'
  arg_name: 'headers'
  is_optional: False
- DocstringParam
  description: '(optional) Dict or CookieJar object to send with the :class:`Request`.'
  kind: param
  key: 'param'
  arg_name: 'cookies'
  is_optional: False
- DocstringParam
  description: |
    (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
    ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
    or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string
    defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
    to add for the file.
  kind: param
  key: 'param'
  arg_name: 'files'
  is_optional: False
- DocstringParam
  description: '(optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.'
  kind: param
  key: 'param'
  arg_name: 'auth'
  is_optional: False
- DocstringParam
  description: |
    (optional) How many seconds to wait for the server to send data
    before giving up, as a float, or a :ref:`(connect timeout, read
    timeout) <timeouts>` tuple.
  kind: param
  key: 'param'
  arg_name: 'timeout'
  type_name: 'float or tuple'
  is_optional: False
- DocstringParam
  description: '(optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.'
  kind: param
  key: 'param'
  arg_name: 'allow_redirects'
  type_name: 'bool'
  is_optional: True
  default: 'True'
- DocstringParam
  description: '(optional) Dictionary mapping protocol to the URL of the proxy.'
  kind: param
  key: 'param'
  arg_name: 'proxies'
  is_optional: False
- DocstringParam
  description: |
    (optional) Either a boolean, in which case it controls whether we verify
    the server's TLS certificate, or a string, in which case it must be a path
    to a CA bundle to use. Defaults to ``True``.
  kind: param
  key: 'param'
  arg_name: 'verify'
  is_optional: True
  default: 'True'
- DocstringParam
  description: '(optional) if ``False``, the response content will be immediately downloaded.'
  kind: param
  key: 'param'
  arg_name: 'stream'
  is_optional: False
- DocstringParam
  description: "(optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair."
  kind: param
  key: 'param'
  arg_name: 'cert'
  is_optional: False
- DocstringReturns
  description: ':class:`Response <Response>` object'
  kind: returns
  key: 'return'
  type_name: 'requests.Response'
  is_generator: False
=== detect
rest
=== compose rest
Constructs and sends a :class:`Request <Request>`.

Usage::

  >>> import requests
  >>> req = requests.request('GET', 'https://httpbin.org/get')
  >>> req
  <Response [200]>

:param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary, list of tuples or bytes to send
    in the query string for the :class:`Request`.
: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 body of the :class:`Request`.
:param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
:param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
:param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
    ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
    or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string
    defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
    to add for the file.
:param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
:param timeout: (optional) How many seconds to wait for the server to send data
    before giving up, as a float, or a :ref:`(connect timeout, read
    timeout) <timeouts>` tuple.
:type timeout: float or tuple
:param bool allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.
:param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
:param verify: (optional) Either a boolean, in which case it controls whether we verify
    the server's TLS certificate, or a string, in which case it must be a path
    to a CA bundle to use. Defaults to ``True``.
:param stream: (optional) if ``False``, the response content will be immediately downloaded.
:param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
:return: :class:`Response <Response>` object
:rtype: requests.Response
