kitir/kits/restful_api.py
def _request_post(cls, url, **kwargs):
        """sends a POST command using requests package"""
        log_action = kwargs.pop('log_action', True)
        session = kwargs.pop('session', None)
        kwargs.setdefault('timeout', cls.request_timeout)
        log_kwargs, kwargs = cls._extract_log_kwargs(**kwargs)
        if log_action:
            log.debug('request.post: url={}'.format(url))
        try:
            if session:
                r = session.post(url, **kwargs)
            else:
                r = requests.post(url, **kwargs)
        except requests.RequestException as exc:
            log.error('requests post exception: exc={} url={}'.format(exc, url))
            raise
        else:
            cls._log_transaction(r, **log_kwargs)
        return r
sends a POST command using requests package
sends a POST command using requests package
sends a POST command using requests package
def _request_post(cls, url, **kwargs):
        log_action = kwargs.pop('log_action', True)
        session = kwargs.pop('session', None)
        kwargs.setdefault('timeout', cls.request_timeout)
        log_kwargs, kwargs = cls._extract_log_kwargs(**kwargs)
        if log_action:
            log.debug('request.post: url={}'.format(url))
        try:
            if session:
                r = session.post(url, **kwargs)
            else:
                r = requests.post(url, **kwargs)
        except requests.RequestException as exc:
            log.error('requests post exception: exc={} url={}'.format(exc, url))
            raise
        else:
            cls._log_transaction(r, **log_kwargs)
        return r
def _request_post ( cls , url , ** kwargs ) : log_action = kwargs . pop ( 'log_action' , True ) session = kwargs . pop ( 'session' , None ) kwargs . setdefault ( 'timeout' , cls . request_timeout ) log_kwargs , kwargs = cls . _extract_log_kwargs ( ** kwargs ) if log_action : log . debug ( 'request.post: url={}' . format ( url ) ) try : if session : r = session . post ( url , ** kwargs ) else : r = requests . post ( url , ** kwargs ) except requests . RequestException as exc : log . error ( 'requests post exception: exc={} url={}' . format ( exc , url ) ) raise else : cls . _log_transaction ( r , ** log_kwargs ) return r
sends a POST command using requests package
sends a POST command using requests package
"""sends a POST command using requests package"""
cls
url