@staticmethod
    def _output_curl_command(resp, file):
        if not file:  # verbose is off
            return

        req = resp.request
        command = "curl -X %(method)s -H %(headers)s -d '%(data)s' '%(url)s'\n"
        headers = ' -H '.join(
            ["'%s: %s'" % (k, v) for k, v in req.headers.items()]
        )

        args = {
            'method': req.method,
            'url': req.url,
            'data': req.body or '',
            'headers': headers
        }

        file.write(
            command % args
        )

        file.write('\n' + '*' * 35 + ' GOT ' + '*' * 35 + '\n')
        file.write(resp.text)
        file.write('\n' + '*' * 35 + ' END ' + '*' * 35 + '\n\n')
Append a node to a tree
dataset/ETHPy150Open Kitware/minerva/server/utility/bsve/bsve_utility.py/BsveUtility._output_curl_command--crossover with--dataset/ETHPy150Open biocore/scikit-bio/skbio/tree/tests/test_tree.py/TreeTests.test_append