perform Multipart Data Task
suspend fun performMultipartDataTask(endpoint: FrameNetworkingEndpoints, filesToUpload: List<FileUpload>, usePublishableKey: Boolean = false): Pair<ByteArray?, NetworkingError?>
Executes a multipart POST to endpoint, uploading each FileUpload as a form-data part.
Return
A pair of (response bytes, error).
Parameters
endpoint
The endpoint to call.
files To Upload
One or more document images to include in the upload.
use Publishable Key
When true, the publishable key is used instead of the secret key.
fun performMultipartDataTask(endpoint: FrameNetworkingEndpoints, filesToUpload: List<FileUpload>, usePublishableKey: Boolean = false, completion: (data: ByteArray?, error: NetworkingError?) -> Unit)
Callback-based multipart POST for callers that cannot use coroutines.
Parameters
endpoint
The endpoint to call.
files To Upload
One or more document images to include in the upload.
use Publishable Key
When true, the publishable key is used instead of the secret key.
completion
Called on an OkHttp worker thread with the response bytes and any error.