public interface RequestCompleted extends NetworkEvent
Modifier and Type | Method and Description |
---|---|
default NetError |
errorCode()
Returns the URL request error code.
|
default boolean |
isCached()
Returns
true if the response has been taken from cache. |
default Network |
network()
Returns the
Network instance initiated this event. |
default int |
responseCode()
Returns the HTTP response code or 0 if the request has been failed or canceled.
|
default UrlRequestStatus |
status()
Returns the status of the URL request.
|
default UrlRequest |
urlRequest()
Returns the URL request that has been completed.
|
default Network network()
NetworkEvent
Network
instance initiated this event.network
in interface NetworkEvent
default UrlRequest urlRequest()
default int responseCode()
default UrlRequestStatus status()
default NetError errorCode()
NetError.NET_ERROR_UNSPECIFIED
value.default boolean isCached()
true
if the response has been taken from cache.