Network.OpenConnection Method  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| OpenConnection(URL) | Opens the specified  | 
| OpenConnection(URL, Proxy) | Opens the specified  | 
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.URLConnectionParameters
- url
- URL
Returns
a URLConnection to the resource referred to by this URL.
- Attributes
Exceptions
if the URL protocol is not HTTP or HTTPS.
if an error occurs while opening the connection.
Remarks
Opens the specified URL on this Network, such that all traffic will be sent on this Network. The URL protocol must be HTTP or HTTPS.
Java documentation for android.net.Network.openConnection(java.net.URL).
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)
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/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.URLConnectionParameters
- url
- URL
- proxy
- Proxy
the proxy through which the connection will be established.
Returns
a URLConnection to the resource referred to by this URL.
- Attributes
Remarks
Opens the specified URL on this Network, such that all traffic will be sent on this Network. The URL protocol must be HTTP or HTTPS.
Java documentation for android.net.Network.openConnection(java.net.URL, java.net.Proxy).
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.