public function post($uri, $bodyJSON, array $options = [], $usePromises = false)
    {
        $headers = [];
        if (!empty($options["headers"]))
            $headers = $options["headers"];

        // overwrite mandatory headers
        if (is_string($bodyJSON)){
            $headers["Content-Length"] = strlen($bodyJSON);
        }

        // get generic headers
        $headers = $this->normalizeHeaders($headers);

        // prepare guzzle request options
        $options = [
            "headers" => $headers,
            "json" => $bodyJSON,
        ];

        $client  = new Client(["base_uri" => $this->getBaseUrl()]);

        if (! $usePromises) {
            // return the response object when the request is completed.
            // this behaviour handles the request synchronously.
            return $client->request('POST', $uri, $options);
            //XXX return $response->getBody()->getContents();
        }

        return $this->promiseResponse($client, $request, $options);
    }