protected function onSuccess(ResponseInterface $response, ?callable $callback = null) : void
    {
        if (!is_null($callback)) {
            $callback($response);
        }
    }
protected function onSuccess(ResponseInterface $response, ?callable $callback = null) : void
    {
        if (!is_null($callback)) {
            $callback($response);
        }
    }
protected function onSuccess ( ResponseInterface $ response , ? callable $ callback = null ) : void { if ( ! is_null ( $ callback ) ) { $ callback ( $ response ) ; } }
Handles async request success.

@param \Psr\Http\Message\ResponseInterface $response
@param callable|null                       $callback

@return void
Handles async request success .