Језик

Proxy.IHttpConnectCallback.OnResponseReceived Method

Definition

Called after receiving a response to the HTTP CONNECT request sent to the proxy to establish a tunnel.

[Android.Runtime.Register("onResponseReceived", "(Ljava/util/List;I)I", "GetOnResponseReceived_Ljava_util_List_IHandler:Android.Net.Http.Proxy/IHttpConnectCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)]
public int OnResponseReceived(System.Collections.Generic.IList<Android.Util.Pair> p0, int p1);
[<Android.Runtime.Register("onResponseReceived", "(Ljava/util/List;I)I", "GetOnResponseReceived_Ljava_util_List_IHandler:Android.Net.Http.Proxy/IHttpConnectCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)>]
abstract member OnResponseReceived : System.Collections.Generic.IList<Android.Util.Pair> * int -> int

Parameters

p0
IList<Pair>

The HTTP CONNECT response headers from the proxy.

p1
Int32

The HTTP status code in the proxy's response.

Returns

The integer value of an OnResponseReceivedAction that specifies whether to close the tunnel or continue establishing it.

Attributes

Remarks

Called after receiving a response to the HTTP CONNECT request sent to the proxy to establish a tunnel. Allows reading headers and status code.

This method must return before any HTTP request can be sent via the tunnel that is being established.

This method will not be called for HTTP requests that will go through the tunnel once it is established.

If this method throws any Throwable, the fate of the tunnel will be as if RESPONSE_ACTION_CLOSE had been returned. The Throwable will not be caught.

Android reference for android.net.http.Proxy.HttpConnectCallback.onResponseReceived.

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