function index() { if (!self::$enabled) { return $this->httpError(404, "There is nothing here"); } $request = $this->getRequest(); if (!$request->isPOST()) { return $this->badRequest(); } // @todo Security checks before we blindly accept a message // @todo includes a configuration test if http and/or https are accepted. // grab the message data $raw = $request->getBody(); try { $inst = new SimpleInterSSMQ(); $inst->processRawMessage($raw); $this->getResponse()->setStatusCode(200); $this->getResponse()->addHeader('Content-Type', "text/plain"); return "ok"; } catch (Exception $e) { throw $e; } }