RequestObserver

interface RequestObserver

Observes request updates, including HTTP response, data and success or failure status.

Functions

Link copied to clipboard
abstract fun onData(id: Long)
Called after the backend has written data to the data stream passed in onResponse.
Link copied to clipboard
abstract fun onFailed(id: Long, @NonNull error: HttpRequestError)
Called once if the request couldn't be completed.
Link copied to clipboard
abstract fun onResponse(id: Long, @NonNull data: ResponseData)
Called once after the HTTP response has been received by the backend
Link copied to clipboard
abstract fun onSucceeded(id: Long)
Called once if the request completed successfully and all data has been written to the data stream.