public function recursivePostRequest(int $maxRecursionCount, callable $callback, string $url, array $requestHeaders = [], array $post = [], bool $returnResponseHeaders = false)
    {
        $i = 0;
        $terminate = false;
        $result = null;

        while ($i++ < $maxRecursionCount && !$terminate) {
            $result = $this->postRequest($url, $requestHeaders, $post, $returnResponseHeaders);

            $terminate = $callback($result, $url, $requestHeaders, $post, $returnResponseHeaders, $maxRecursionCount, $i);
        }

        return $result;
    }