Network.OpenConnection Method

Definition

Overloads

OpenConnection(URL)

Opens the specified URL on this Network, such that all traffic will be sent on this Network.

OpenConnection(URL, Proxy)

OpenConnection(URL)

Opens the specified URL on this Network, such that all traffic will be sent on this Network.

[Android.Runtime.Register("openConnection", "(Ljava/net/URL;)Ljava/net/URLConnection;", "GetOpenConnection_Ljava_net_URL_Handler")]
public virtual Java.Net.URLConnection? OpenConnection (Java.Net.URL? url);
[<Android.Runtime.Register("openConnection", "(Ljava/net/URL;)Ljava/net/URLConnection;", "GetOpenConnection_Ljava_net_URL_Handler")>]
abstract member OpenConnection : Java.Net.URL -> Java.Net.URLConnection
override this.OpenConnection : Java.Net.URL -> Java.Net.URLConnection

Parameters

url
URL

Returns

URLConnection
Attributes

Exceptions

if the URL protocol is not HTTP or HTTPS.

if an error occurs while opening the connection.

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.

See also

Applies to

OpenConnection(URL, Proxy)

[Android.Runtime.Register("openConnection", "(Ljava/net/URL;Ljava/net/Proxy;)Ljava/net/URLConnection;", "GetOpenConnection_Ljava_net_URL_Ljava_net_Proxy_Handler", ApiSince=23)]
public virtual Java.Net.URLConnection? OpenConnection (Java.Net.URL? url, Java.Net.Proxy? proxy);
[<Android.Runtime.Register("openConnection", "(Ljava/net/URL;Ljava/net/Proxy;)Ljava/net/URLConnection;", "GetOpenConnection_Ljava_net_URL_Ljava_net_Proxy_Handler", ApiSince=23)>]
abstract member OpenConnection : Java.Net.URL * Java.Net.Proxy -> Java.Net.URLConnection
override this.OpenConnection : Java.Net.URL * Java.Net.Proxy -> Java.Net.URLConnection

Parameters

url
URL
proxy
Proxy

Returns

URLConnection
Attributes

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