def _createResponse(val):
    if getattr(cherrypy.request, 'girderRawResponse', False) is True:
        return val

    accepts = cherrypy.request.headers.elements('Accept')
    for accept in accepts:
        if accept.value == 'application/json':
            break
        elif accept.value == 'text/html':  # pragma: no cover
            # Pretty-print and HTML-ify the response for the browser
            cherrypy.response.headers['Content-Type'] = 'text/html'
            resp = json.dumps(val, indent=4, sort_keys=True,
                              separators=(',', ': '), cls=JsonEncoder)
            resp = resp.replace(' ', '&nbsp;').replace('\n', '<br />')
            resp = '<div style="font-family:monospace;">%s</div>' % resp
            return resp.encode('utf8')

    # Default behavior will just be normal JSON output. Keep this
    # outside of the loop body in case no Accept header is passed.
    cherrypy.response.headers['Content-Type'] = 'application/json'
    return json.dumps(val, sort_keys=True, cls=JsonEncoder).encode('utf8')
Getting argument.
dataset/ETHPy150Open girder/girder/girder/api/rest.py/_createResponse--crossover with--dataset/ETHPy150Open pytest-dev/pytest-bdd/tests/args/cfparse/test_args.py/get_argument