How to use the apiritif.__init__.http.request function in apiritif

To help you get started, we’ve selected a few apiritif examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Blazemeter / taurus / apiritif / __init__.py View on Github external
"""
        Prepares and sends an HTTP request. Returns the response.

        :param method: str
        :param path: str
        :return: response
        :rtype: HTTPResponse
        """
        if self._keep_alive and self.__session is None:
            self.__session = requests.Session()

        if self.__session is not None and not self._use_cookies:
            self.__session.cookies.clear()

        address = self._bake_address(path)
        response = http.request(method, address, session=self.__session,
                                params=params, headers=headers, cookies=cookies, data=data, json=json,
                                allow_redirects=allow_redirects, timeout=timeout)
        if self._auto_assert_ok:
            response.assert_ok()
        return response
github Blazemeter / taurus / apiritif / __init__.py View on Github external
def patch(address, **kwargs):
        return http.request("PATCH", address, **kwargs)