AndroidClientHandler.SetupRequest(HttpRequestMessage, HttpURLConnection) Method

Definition

Configure the HttpURLConnection before the request is sent. This method is meant to be overriden by applications which need to perform some extra configuration steps on the connection. It is called with all the request headers set, pre-authentication performed (if applicable) but before the request body is set (e.g. for POST requests). The default implementation in AndroidClientHandler does nothing.

protected virtual System.Threading.Tasks.Task SetupRequest (System.Net.Http.HttpRequestMessage request, Java.Net.HttpURLConnection conn);
abstract member SetupRequest : System.Net.Http.HttpRequestMessage * Java.Net.HttpURLConnection -> System.Threading.Tasks.Task
override this.SetupRequest : System.Net.Http.HttpRequestMessage * Java.Net.HttpURLConnection -> System.Threading.Tasks.Task

Parameters

request
HttpRequestMessage

Request data

conn
HttpURLConnection

Pre-configured connection instance

Returns

Task

Remarks

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