Serializable
public class HttpRetryException extends IOException
Constructor | Description |
---|---|
HttpRetryException |
Constructs a new HttpRetryException from the specified response code and exception detail message |
HttpRetryException |
Constructs a new HttpRetryException with detail message responseCode and the contents of the Location response header field. |
Modifier and Type | Method | Description |
---|---|---|
String |
getLocation() |
Returns the value of the Location header field if the error resulted from redirection. |
String |
getReason() |
Returns a string explaining why the http request could not be retried. |
int |
responseCode() |
Returns the http response code |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public HttpRetryException(String detail, int code)
HttpRetryException
from the specified response code and exception detail messagedetail
- the detail message.code
- the HTTP response code from server.public HttpRetryException(String detail, int code, String location)
HttpRetryException
with detail message responseCode and the contents of the Location response header field.detail
- the detail message.code
- the HTTP response code from server.location
- the URL to be redirected topublic int responseCode()
public String getReason()
public String getLocation()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/net/HttpRetryException.html