/** * Note that as of 5.0.3, the creation of the response, which may block * intentionally, is separated from request count tracking, and this * method no longer increments the count transparently. Instead * {@link #incrementAndValidate()} must be invoked independently. */ @Override public ClientHttpResponse createResponse(@Nullable ClientHttpRequest request) throws IOException { ResponseCreator responseCreator = getResponseCreator(); Assert.state(responseCreator != null, "createResponse() called before ResponseCreator was set"); return responseCreator.createResponse(request); }
/** * Note that as of 5.0.3, the creation of the response, which may block * intentionally, is separated from request count tracking, and this * method no longer increments the count transparently. Instead * {@link #incrementAndValidate()} must be invoked independently. */ @Override public ClientHttpResponse createResponse(@Nullable ClientHttpRequest request) throws IOException { ResponseCreator responseCreator = getResponseCreator(); Assert.state(responseCreator != null, "createResponse() called before ResponseCreator was set"); return responseCreator.createResponse(request); }
@Override public ClientHttpResponse createResponse(ClientHttpRequest request) throws IOException { ResponseCreator responseCreator = getResponseCreator(); if (responseCreator == null) { throw new IllegalStateException("createResponse called before ResponseCreator was set"); } getRequestCount().incrementAndValidate(); return responseCreator.createResponse(request); }