protected function onFulfilled(RequestInterface $request, array $options)
    {
        return function (ResponseInterface $response) use ($request, $options) {
            return $this->shouldRetryHttpResponse($options, $response)
                ? $this->doRetry($request, $options, $response)
                : $this->returnResponse($options, $response);
        };
    }
protected function onFulfilled(RequestInterface $request, array $options)
    {
        return function (ResponseInterface $response) use ($request, $options) {
            return $this->shouldRetryHttpResponse($options, $response)
                ? $this->doRetry($request, $options, $response)
                : $this->returnResponse($options, $response);
        };
    }
protected function onFulfilled ( RequestInterface $ request , array $ options ) { return function ( ResponseInterface $ response ) use ( $ request , $ options ) { return $ this -> shouldRetryHttpResponse ( $ options , $ response ) ? $ this -> doRetry ( $ request , $ options , $ response ) : $ this -> returnResponse ( $ options , $ response ) ; } ; }
No exceptions were thrown during processing

Depending on where this middleware is in the stack, the response could still
be unsuccessful (e.g. 429 or 503), so check to see if it should be retried

@param RequestInterface $request
@param array $options
@return callable
No exceptions were thrown during processing