Interface RequestCompleted

All Superinterfaces:
Event, NetworkEvent

public interface RequestCompleted extends NetworkEvent
An event indicating that the URL request has been completed.
  • Method Summary

    Modifier and Type
    Method
    Description
    default NetError
    Returns the URL request error code.
    default boolean
    Returns true if the response has been taken from cache.
    default Network
    Returns the Network instance initiated this event.
    default int
    Returns the HTTP response code or 0 if the request has been failed or canceled.
    Returns the status of the URL request.
    default UrlRequest
    Returns the URL request that has been completed.
  • Method Details

    • network

      default Network network()
      Description copied from interface: NetworkEvent
      Returns the Network instance initiated this event.
      Specified by:
      network in interface NetworkEvent
    • urlRequest

      default UrlRequest urlRequest()
      Returns the URL request that has been completed.
    • responseCode

      default int responseCode()
      Returns the HTTP response code or 0 if the request has been failed or canceled.
    • status

      default UrlRequestStatus status()
      Returns the status of the URL request.
    • errorCode

      default NetError errorCode()
      Returns the URL request error code. In case the request has failed, contains the error code of the network. Otherwise, has the default NetError.NET_ERROR_UNSPECIFIED value.
    • isCached

      default boolean isCached()
      Returns true if the response has been taken from cache.
      Since:
      7.9