public class RedirectionException extends UnexpectedStatusException
Exception that's thrown when the server returns a (unhandled) redirect.
There are two subclasses for specific error conditions: TooManyRedirectsException and RedirectionLoopException.
| Constructor and Description |
|---|
RedirectionException(HttpStatus status,
java.lang.String message,
java.net.URI redirectingLocation,
java.net.URI newLocation) |
RedirectionException(HttpStatus status,
java.net.URI redirectingLocation,
java.net.URI newLocation) |
| Modifier and Type | Method and Description |
|---|---|
java.net.URI |
newLocation()
Returns the new
URI as returned by the server, may be null for some status codes. |
java.net.URI |
redirectingLocation()
Returns the
URI of the location that returned the redirect. |
statuspublic RedirectionException(HttpStatus status, java.net.URI redirectingLocation, java.net.URI newLocation)
public RedirectionException(HttpStatus status, java.lang.String message, java.net.URI redirectingLocation, java.net.URI newLocation)
public java.net.URI redirectingLocation()
URI of the location that returned the redirect.URI.public java.net.URI newLocation()
URI as returned by the server, may be null for some status codes.URI or null.