Skip to content

Most visited

Recently visited

navigation
Added in API level 1

HttpRetryException

public class HttpRetryException
extends IOException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.io.IOException
         ↳ java.net.HttpRetryException


If a HTTP request has to be retried, this exception will be thrown if the request cannot be retried automatically.

Summary

Public constructors

HttpRetryException(String detail, int code)

Creates a new HttpRetryException instance with the specified response code and the given detail message.

HttpRetryException(String detail, int code, String location)

Creates a new HttpRetryException instance with the specified response code, the given detail message and the value of the location field from the response header.

Public methods

String getLocation()

Gets the location value.

String getReason()

Gets the detail message.

int responseCode()

Gets the response code.

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

HttpRetryException

Added in API level 1
HttpRetryException (String detail, 
                int code)

Creates a new HttpRetryException instance with the specified response code and the given detail message.

Parameters
detail String: the detail message for this exception.
code int: the HTTP response code from target host.

HttpRetryException

Added in API level 1
HttpRetryException (String detail, 
                int code, 
                String location)

Creates a new HttpRetryException instance with the specified response code, the given detail message and the value of the location field from the response header.

Parameters
detail String: the detail message for this exception.
code int: the HTTP response code from target host.
location String: the destination URL of the redirection.

Public methods

getLocation

Added in API level 1
String getLocation ()

Gets the location value.

Returns
String the stored location from the HTTP header.

getReason

Added in API level 1
String getReason ()

Gets the detail message.

Returns
String the detail message.

responseCode

Added in API level 1
int responseCode ()

Gets the response code.

Returns
int the HTTP response code.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.