Exemplo n.º 1
0
    def debug_response(self, response_header):
        """
        Debug response
        :param dict response_header: response header
        :return: bool
        """

        tpl.debug(key='response_header_dbg', dbg=helper.to_json(response_header))

        return True
Exemplo n.º 2
0
    def process(self):
        """
        Process data
        :return: str
        """

        resultset = helper.to_json(self._data)

        try:
            filesystem.clear(self.__target_dir, extension=self.EXTENSION_SET)
            self.record(self.__target_dir, self._target, resultset)
        except (Exception, FileSystemError) as error:
            raise Exception(error)
Exemplo n.º 3
0
    def process(self):
        """
        Process data
        :return: str
        """

        resultset = helper.to_json(self._data)

        try:
            filesystem.clear(self.__target_dir, extension=self.EXTENSION_SET)
            self.record(self.__target_dir, self._target, resultset)
        except (Exception, FileSystemError) as e:
            raise Exception(e)
Exemplo n.º 4
0
    def debug_request(self, request_header, url, method):
        """
        Debug request
        :param dict request_header: request header
        :param str url: request url
        :param str method: request method
        :return: bool
        """

        request_header.update({'Request URI': url})
        request_header.update({'Request Method': method})

        tpl.debug(key='request_header_dbg', dbg=helper.to_json(request_header))

        return True
Exemplo n.º 5
0
    def debug_request(self, request_header, url, method):
        """
        Debug request
        :param dict request_header: request header
        :param str url: request url
        :param str method: request method
        :return: bool
        """

        request_header.update({'Request URI': url})
        request_header.update({'Request Method': method})

        tpl.debug(key='request_header_dbg', dbg=helper.to_json(request_header))

        return True