/** * Set the absolute URI of the ultimate request that was made to receive this response. * * <p>If the original request URI has been modified (e.g. due to redirections), the absolute URI * of the ultimate request being made to receive the response should be set by the caller on the * response instance using this method. * * @param uri absolute URI of the ultimate request made to receive this response. Must not be * {@code null}. * @throws java.lang.NullPointerException in case the passed {@code uri} parameter is null. * @throws java.lang.IllegalArgumentException in case the passed {@code uri} parameter does not * represent an absolute URI. * @see ClientProperties#FOLLOW_REDIRECTS * @see #getResolvedRequestUri() * @since 2.6 */ public void setResolvedRequestUri(final URI uri) { if (uri == null) { throw new NullPointerException(LocalizationMessages.CLIENT_RESPONSE_RESOLVED_URI_NULL()); } if (!uri.isAbsolute()) { throw new IllegalArgumentException( LocalizationMessages.CLIENT_RESPONSE_RESOLVED_URI_NOT_ABSOLUTE()); } this.resolvedUri = uri; }