def post(self, img_type): logging.warn("--------type is " + img_type) data = request.stream.read() g = gg.get_graph(json.loads(data)) file_name = gg.get_image(g, img_type=img_type) return send_file(file_name, mimetype='image/' + img_type)
def post(self, img_type): logging.warn("--------type is " + img_type) data = request.stream.read() g = gg.get_graph(json.loads(data)) file_name = gg.get_image(g, img_type=img_type, renderer='graphviz') return send_file(file_name, mimetype='image/' + img_type)
def post(self): data = request.stream.read() try: cx = json.loads(data) except: return { 'error': 'Could not parse input JSON (CX).', 'code': 400 }, 400 g = gg.get_graph(cx) file_name = gg.get_image(g, 'png') return send_file(file_name, mimetype='image/png')
def post(self): data = request.stream.read() g = gg.get_graph(json.loads(data)) file_name = gg.get_image(g, 'png') return send_file(file_name, mimetype='image/png')