PendingRequest

Represents a pending request from client to server, retained on the client during offline operation until it can be successfully uploaded to the server, or cancelled by the application.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val changeSet: String?
Link copied to clipboard
open val customTag: String?
Link copied to clipboard
open override val dataType: DataType
Link copied to clipboard
open val entitySet: EntitySet?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val hasError: Boolean
Link copied to clipboard
Link copied to clipboard
open val httpMethod: String
Link copied to clipboard
open val httpStatus: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val requestID: Long
Link copied to clipboard
open val requestType: String?
Link copied to clipboard
open val requestURL: String
Link copied to clipboard
open val responseType: String?
Link copied to clipboard
Link copied to clipboard
open val uploadGroup: String?

Functions

Link copied to clipboard
open fun cancel()

Cancel this pending request any any other pending requests that depend on it.

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.OfflineDataService#cancelPendingRequests(com.sap.cloud.mobile.kotlin.odata.PendingRequestList?) OfflineDataService.cancelPendingRequests}.

Link copied to clipboard
open fun getAffectedEntity(fixRequest: Boolean): EntityValue?

Return (nullable) The latest client-side state of the entity (if any) that was affected by this request, or if fixRequest is true, then an entity that can be updated to directly fix this pending request.

Link copied to clipboard

Return the other requests (if any) that depend on the successful completion of this request.

Link copied to clipboard

Return (nullable) The error response information, if {@link com.sap.cloud.mobile.kotlin.odata.PendingRequest#hasError PendingRequest.hasError} is true.

Link copied to clipboard
open fun getLatestDownload(fixRequest: Boolean): EntityValue?

Return (nullable) The latest downloaded state of the entity (if any), that was affected by this request.

Link copied to clipboard
open fun getOriginalEntity(fixRequest: Boolean): EntityValue?

Return (nullable) The original downloaded state of the entity (if any), that was affected by this request.

Link copied to clipboard

Return (nullable) HTTP request body (as binary data) if available, otherwise null.

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.PendingRequest#getRequestText() PendingRequest.getRequestText}.

Link copied to clipboard
open fun getRequestText(): String?

Return (nullable) HTTP request body (as text string) if available, otherwise null. If non-null, the returned value will typically be a JSON text string. Note: If {@link com.sap.cloud.mobile.kotlin.odata.PendingRequest#method PendingRequest.method} is createMedia, uploadMedia or uploadStream, then null will be returned even if the stream's media type indicates text.

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.PendingRequest#getRequestData() PendingRequest.getRequestData}.

Link copied to clipboard

Return (nullable) HTTP response body (as binary data) if available, otherwise null.

Link copied to clipboard
open fun getResponseText(): String?

Return (nullable) HTTP response body (as text string) if available, otherwise null. If non-null, the returned value will typically be a JSON text string.

Link copied to clipboard
open override fun toString(): String

Return string representation of this pending request, omitting request headers and content.

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.PendingRequest#toStringWithDetails(kotlin.Boolean, kotlin.Boolean, kotlin.Boolean, kotlin.Boolean) PendingRequest.toStringWithDetails}.

Link copied to clipboard
open fun toStringWithDetails(fetchDetails: Boolean): String
open fun toStringWithDetails(fetchDetails: Boolean, includeHeaders: Boolean): String
open fun toStringWithDetails(fetchDetails: Boolean, includeHeaders: Boolean, includeContent: Boolean): String
open fun toStringWithDetails(fetchDetails: Boolean, includeHeaders: Boolean, includeContent: Boolean, hideCredentials: Boolean): String

Return string representation of this pending request, with optional details.