Språk

UrlRequest.Builder.SetUploadDataProvider Method

Definition

Sets upload data provider.

[Android.Runtime.Register("setUploadDataProvider", "(Landroid/net/http/UploadDataProvider;Ljava/util/concurrent/Executor;)Landroid/net/http/UrlRequest$Builder;", "GetSetUploadDataProvider_Landroid_net_http_UploadDataProvider_Ljava_util_concurrent_Executor_Handler", ApiSince=34)]
public abstract Android.Net.Http.UrlRequest.Builder SetUploadDataProvider(Android.Net.Http.UploadDataProvider uploadDataProvider, Java.Util.Concurrent.IExecutor executor);
[<Android.Runtime.Register("setUploadDataProvider", "(Landroid/net/http/UploadDataProvider;Ljava/util/concurrent/Executor;)Landroid/net/http/UrlRequest$Builder;", "GetSetUploadDataProvider_Landroid_net_http_UploadDataProvider_Ljava_util_concurrent_Executor_Handler", ApiSince=34)>]
abstract member SetUploadDataProvider : Android.Net.Http.UploadDataProvider * Java.Util.Concurrent.IExecutor -> Android.Net.Http.UrlRequest.Builder

Parameters

uploadDataProvider
UploadDataProvider

responsible for providing the upload data. This value cannot be null.

executor
IExecutor

All uploadDataProvider methods will be invoked using this Executor. May optionally be the same Executor the request itself is using. This value cannot be null.

Returns

the builder to facilitate chaining. This value cannot be null.

Attributes

Remarks

Sets upload data provider. Switches method to "POST" if not explicitly set. Starting the request will throw an exception if a Content-Type header is not set.

Android reference for android.net.http.UrlRequest.Builder.setUploadDataProvider.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to