private function generate(
        string $identifier,
        string $method,
        string $timestamp,
        string $uri,
        string $content
    ) : string {
        $payload = [
            'id' => $identifier,
            'method' => strtoupper($method),
            'timestamp' => $timestamp,
            'uri' => rtrim($uri, '/')
        ];

        if (is_null(json_decode($content))) {
            $payload = array_merge($payload, [
                'content' => $content
            ]);
        } else {
            $payload = array_merge($payload, [
                'content' => json_encode(
                    json_decode($content),
                    JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
                )
            ]);
        }

        return json_encode($payload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    }