ApiHandler.py 457 B

123456789101112131415161718
  1. from handlers.HandlerBase import BaseHandler
  2. from model.DataBaseUtils import MysqlUtils
  3. import json
  4. import requests
  5. class YgApiHandler(BaseHandler,MysqlUtils):
  6. def post(self):
  7. print(self.get_args())
  8. print(type(self.get_args()))
  9. path=self.get_args()["path"]
  10. print(path)
  11. self.quchen_text.execute(f"replace into yangguang_path (path) values ('{path}')")
  12. self.write(json.dumps({"code":200,"msg":"ok"}))