public function publish(Message $message): ChannelInformation
    {
        $response = $this->client->post(
            new Request(
                $this->channelUrl,
                [
                    'Accept'              => 'application/json',
                    'Content-Type'        => $message->contentType(),
                    'X-EventSource-Event' => $message->name()
                ],
                $message->content()
            )
        );

        if (!in_array($response->statusCode(), [Response::CREATED, Response::ACCEPTED])) {
            throw new NchanException(
                sprintf(
                    'Unable to publish to channel. Maybe the channel does not exists. HTTP status code was %s.',
                    $response->statusCode()
                )
            );
        }

        return ChannelInformation::fromJson($response->body());
    }