src/Resources/SnsEndpoint.php
protected function handlePOST()
    {
        $payload = $this->request->getPayloadData();
        if (empty($payload)) {
            throw new BadRequestException('No data in endpoint post request.');
        }

        if (empty($this->resource)) {
            return $this->createEndpoint($payload);
        } else {
            return $this->service->publish($payload, SnsEndpoint::RESOURCE_NAME, $this->resource);
        }
    }
protected function handlePOST()
    {
        $payload = $this->request->getPayloadData();
        if (empty($payload)) {
            throw new BadRequestException('No data in endpoint post request.');
        }

        if (empty($this->resource)) {
            return $this->createEndpoint($payload);
        } else {
            return $this->service->publish($payload, SnsEndpoint::RESOURCE_NAME, $this->resource);
        }
    }
{@inheritdoc}