class Socket: def __init__(self): url = os.getenv('SERVER_URI') self.request = Request(url) def emit(self, data): self.request.post('/prob-data', {"prob": data})
def perform(self, paste, analyzer_name=None): """Trigger the webhook""" # TODO - More post options ([custom] body, template, choose between GET/POST etc.) r = Request() r.post(url=self.url)