MCPcopy Create free account
hub / github.com/bugy/script-server / post

Method post

src/web/server.py:664–679  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

662# Use for testing only
663class ReceiveAlertHandler(BaseRequestHandler):
664 def post(self):
665 body = tornado_utils.get_request_body(self)
666
667 files = body.get('files', {})
668 if files:
669 del body['files']
670
671 LOGGER.info('ReceiveAlertHandler. Received alert: ' + str(body))
672
673 for key, value in files.items():
674 filename = str(time.time()) + '_' + key
675
676 LOGGER.info('ReceiveAlertHandler. Writing file ' + filename)
677
678 file_path = os.path.join('logs', 'alerts', filename)
679 file_utils.write_file(file_path, value)
680
681
682class GetShortHistoryEntriesHandler(BaseRequestHandler):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected