def post(self):
        # Extract useful information from POST request and store it as a dictionary data structure
        self.message = dict(self.request.arguments)
        # Extract value of url, action and state request parameters from request body
        # Request parameters values by default is []
        self.url = self.get_body_argument("url", default=[])
        self.action = self.get_body_argument("action", default=[])
        self.state = self.get_body_argument("state", default=[])

        # Validate url parameter
        try:
            if not self.url:
                pass
            elif self.get_component("url_manager").IsURL(self.url):
                pass
            else:
                raise exceptions.InvalidUrlReference(400)
        except exceptions.InvalidUrlReference:
            raise tornado.web.HTTPError(400, "exceptions.Invalid URL")
        # Validate action parameter
        try:
            if (self.action in self.VALID_ACTIONS) or (not self.action):
                pass
            else:
                raise exceptions.InvalidActionReference(400)
        except exceptions.InvalidActionReference:
            raise tornado.web.HTTPError(400, "exceptions.Invalid action")
        # Validate state parameter
        try:
            if (self.state == "on") or (self.state == "off") or (not self.state):
                pass
            else:
                raise exceptions.InvalidActionReference(400)
        except exceptions.InvalidActionReference:
            raise tornado.web.HTTPError(400, "exceptions.Invalid action state")
        # If received message is valid, send it to proxy PnH Handler and log this event
        try:
            if not self.message:
                raise exceptions.InvalidMessageReference
            else:
                # TO DO: send message to proxy handler and verify if event registered in log file
                self.application.Core.write_event(json.dumps(self.message), 'a')
        except exceptions.InvalidMessageReference:
            raise tornado.web.HTTPError(412, "Empty message")
        except __HOLE__ as e:
            cprint("\n")
            cprint("I/O error at event writing: ({0}): {1}".format(e.errno, e.strerror))
            cprint("\n")
dataset/ETHPy150Open owtf/owtf/framework/interface/api_handlers.py/PlugnhackHandler.post