/** * Setup POST data * * @param HttpCargoInterface $cargo */ protected function setupPost(HttpCargoInterface $cargo) { $cargo->setContent($this->getPostParameters()); // Content type if ($contentType = $cargo->getRequestHeader(Http::HEADER_CONTENT_TYPE)) { $cargo->setContentType($contentType); } }
/** * Reply: Method not allowed * * @param HttpCargoInterface $cargo * @return HttpCargoInterface */ protected function replyMethodNotAllowed(HttpCargoInterface $cargo) : HttpCargoInterface { return $cargo->setContent(static::CONTENT_METHOD_NOT_ALLOWED)->setContentType(static::CONTENT_TYPE)->setStatusCode(Http::STATUS_METHOD_NOT_ALLOWED_405); }