HttpsURLConnection HttpsURLConnection Class

Definition

An HttpURLConnection for HTTPS ().

[Android.Runtime.Register("javax/net/ssl/HttpsURLConnection", ApiSince=1, DoNotGenerateAcw=true)]
public abstract class HttpsURLConnection : Java.Net.HttpURLConnection
type HttpsURLConnection = class
    inherit HttpURLConnection
Inheritance
Attributes

Remarks

Android platform documentation

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.

Constructors

HttpsURLConnection(IntPtr, JniHandleOwnership) HttpsURLConnection(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

HttpsURLConnection(URL) HttpsURLConnection(URL)

Creates a new HttpsURLConnection with the specified URL.

Properties

AllowUserInteraction AllowUserInteraction

Returns allowUserInteraction.

(Inherited from URLConnection)
ChunkLength ChunkLength

If the HTTP chunked encoding is enabled this parameter defines the chunk-length.

(Inherited from HttpURLConnection)
CipherSuite CipherSuite

Returns the name of the cipher suite negotiated during the SSL handshake.

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Connected Connected

Specifies whether this URLConnection is already connected to the remote resource.

(Inherited from URLConnection)
ConnectTimeout ConnectTimeout

Returns the connect timeout in milliseconds.

(Inherited from URLConnection)
Content Content

Returns an object representing the content of the resource this URLConnection is connected to.

(Inherited from URLConnection)
ContentEncoding ContentEncoding

Returns the content encoding type specified by the response header field content-encoding or null if this field is not set.

(Inherited from URLConnection)
ContentLength ContentLength

Returns the content length in bytes specified by the response header field content-length or -1 if this field is not set or cannot be represented as an int.

(Inherited from URLConnection)
ContentLengthLong ContentLengthLong Inherited from URLConnection
ContentType ContentType

Returns the MIME-type of the content specified by the response header field content-type or null if type is unknown.

(Inherited from URLConnection)
Date Date

Returns the timestamp when this response has been sent as a date in milliseconds since January 1, 1970 GMT or 0 if this timestamp is unknown.

(Inherited from URLConnection)
DefaultHostnameVerifier DefaultHostnameVerifier

Returns the default hostname verifier.

DefaultSSLSocketFactory DefaultSSLSocketFactory

Returns the default SSL socket factory for new instances.

DefaultUseCaches DefaultUseCaches

Returns the default setting whether this connection allows using caches.

(Inherited from URLConnection)
DoInput DoInput

Returns the value of the option doInput which specifies whether this connection allows to receive data.

(Inherited from URLConnection)
DoOutput DoOutput

Returns the value of the option doOutput which specifies whether this connection allows to send data.

(Inherited from URLConnection)
ErrorStream ErrorStream

Returns an input stream from the server in the case of an error such as the requested file has not been found on the remote server.

(Inherited from HttpURLConnection)
Expiration Expiration

Returns the timestamp when this response will be expired in milliseconds since January 1, 1970 GMT or 0 if this timestamp is unknown.

(Inherited from URLConnection)
FixedContentLength FixedContentLength

The byte count in the request body if it is both known and streamed; and -1 otherwise.

(Inherited from HttpURLConnection)
FixedContentLengthLong FixedContentLengthLong

The byte count in the request body if it is both known and streamed; and -1 otherwise.

(Inherited from HttpURLConnection)
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
HeaderFields HeaderFields

Returns an unmodifiable map of the response-header fields and values.

(Inherited from URLConnection)
HostnameVerifier HostnameVerifier

Returns the hostname verifier used by this instance.

IfModifiedSince IfModifiedSince

Returns the point of time since when the data must be modified to be transmitted.

(Inherited from URLConnection)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
InputStream InputStream

Returns an InputStream for reading data from the resource pointed by this URLConnection.

(Inherited from URLConnection)
InstanceFollowRedirects InstanceFollowRedirects

Returns whether this connection follows redirects.

(Inherited from HttpURLConnection)
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
LastModified LastModified

Returns the value of the response header field last-modified or 0 if this value is not set.

(Inherited from URLConnection)
LocalPrincipal LocalPrincipal

Returns the Principal used to identify the local host during the handshake.

Method Method

The HTTP request method of this HttpURLConnection.

(Inherited from HttpURLConnection)
OutputStream OutputStream

Returns an OutputStream for writing data to this URLConnection.

(Inherited from URLConnection)
PeerPrincipal PeerPrincipal

Returns the Principal identifying the peer.

PeerReference PeerReference Inherited from Object
Permission Permission

Returns a Permission object representing all needed permissions to open this connection.

(Inherited from URLConnection)
ReadTimeout ReadTimeout

Returns the read timeout in milliseconds, or 0 if reads never timeout.

(Inherited from URLConnection)
RequestMethod RequestMethod

Returns the request method which will be used to make the request to the remote HTTP server.

(Inherited from HttpURLConnection)
RequestProperties RequestProperties

Returns an unmodifiable map of general request properties used by this connection.

(Inherited from URLConnection)
ResponseCode ResponseCode

Returns the response code returned by the remote HTTP server.

(Inherited from HttpURLConnection)
ResponseMessage ResponseMessage

Returns the response message returned by the remote HTTP server.

(Inherited from HttpURLConnection)
SSLSocketFactory SSLSocketFactory

Returns the SSL socket factory used by this instance.

ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

URL URL

Returns the URL represented by this URLConnection.

(Inherited from URLConnection)
Url Url

The URL which represents the remote target of this URLConnection.

(Inherited from URLConnection)
UseCaches UseCaches

Returns the value of the flag which specifies whether this URLConnection allows to use caches.

(Inherited from URLConnection)

Methods

AddRequestProperty(String, String) AddRequestProperty(String, String)

Adds the given property to the request header.

(Inherited from URLConnection)
Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
Connect() Connect()

Opens a connection to the resource.

(Inherited from URLConnection)
ConnectAsync() ConnectAsync() Inherited from URLConnection
Disconnect() Disconnect()

Releases this connection so that its resources may be either reused or closed.

(Inherited from HttpURLConnection)
Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetContent(Class[]) GetContent(Class[])

Returns an object representing the content of the resource this URLConnection is connected to.

(Inherited from URLConnection)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetHeaderField(Int32) GetHeaderField(Int32)

Returns the header value at the field position pos or null if the header has fewer than pos fields.

(Inherited from URLConnection)
GetHeaderField(String) GetHeaderField(String)

Returns the value of the header field specified by key or null if there is no field with this name.

(Inherited from URLConnection)
GetHeaderFieldDate(String, Int64) GetHeaderFieldDate(String, Int64)

Returns the specified header value as a date in milliseconds since January 1, 1970 GMT.

(Inherited from URLConnection)
GetHeaderFieldInt(String, Int32) GetHeaderFieldInt(String, Int32)

Returns the specified header value as a number.

(Inherited from URLConnection)
GetHeaderFieldKey(Int32) GetHeaderFieldKey(Int32)

Returns the name of the header field at the given position posn or null if there are fewer than posn fields.

(Inherited from URLConnection)
GetHeaderFieldLong(String, Int64) GetHeaderFieldLong(String, Int64) Inherited from URLConnection
GetLocalCertificates() GetLocalCertificates()

Returns the list of local certificates used during the handshake.

GetRequestProperty(String) GetRequestProperty(String)

Returns the value of the request header property specified by {code field} or null if there is no field with this name.

(Inherited from URLConnection)
GetServerCertificates() GetServerCertificates()

Return the list of certificates identifying the peer during the handshake.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
SetChunkedStreamingMode(Int32) SetChunkedStreamingMode(Int32)

Stream a request body whose length is not known in advance.

(Inherited from HttpURLConnection)
SetFixedLengthStreamingMode(Int32) SetFixedLengthStreamingMode(Int32)

Equivalent to setFixedLengthStreamingMode((long) contentLength), but available on earlier versions of Android and limited to 2 GiB.

(Inherited from HttpURLConnection)
SetFixedLengthStreamingMode(Int64) SetFixedLengthStreamingMode(Int64)

Configures this connection to stream the request body with the known fixed byte count of contentLength.

(Inherited from HttpURLConnection)
SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetRequestProperty(String, String) SetRequestProperty(String, String)

Sets the value of the specified request header field.

(Inherited from URLConnection)
ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
UsingProxy() UsingProxy()

Returns whether this connection uses a proxy server or not.

(Inherited from HttpURLConnection)
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Fields

HttpAccepted HttpAccepted

Numeric status code, 202: Accepted

(Inherited from HttpURLConnection)
HttpBadGateway HttpBadGateway

Numeric status code, 502: Bad Gateway

(Inherited from HttpURLConnection)
HttpBadMethod HttpBadMethod

Numeric status code, 405: Bad Method

(Inherited from HttpURLConnection)
HttpBadRequest HttpBadRequest

Numeric status code, 400: Bad Request

(Inherited from HttpURLConnection)
HttpClientTimeout HttpClientTimeout

Numeric status code, 408: Client Timeout

(Inherited from HttpURLConnection)
HttpConflict HttpConflict

Numeric status code, 409: Conflict

(Inherited from HttpURLConnection)
HttpCreated HttpCreated

Numeric status code, 201: Created

(Inherited from HttpURLConnection)
HttpEntityTooLarge HttpEntityTooLarge

Numeric status code, 413: Entity too large

(Inherited from HttpURLConnection)
HttpForbidden HttpForbidden

Numeric status code, 403: Forbidden

(Inherited from HttpURLConnection)
HttpGatewayTimeout HttpGatewayTimeout

Numeric status code, 504: Gateway timeout

(Inherited from HttpURLConnection)
HttpGone HttpGone

Numeric status code, 410: Gone

(Inherited from HttpURLConnection)
HttpInternalError HttpInternalError

Numeric status code, 500: Internal error

(Inherited from HttpURLConnection)
HttpLengthRequired HttpLengthRequired

Numeric status code, 411: Length required

(Inherited from HttpURLConnection)
HttpMovedPerm HttpMovedPerm

Numeric status code, 301 Moved permanently

(Inherited from HttpURLConnection)
HttpMovedTemp HttpMovedTemp

Numeric status code, 302: Moved temporarily

(Inherited from HttpURLConnection)
HttpMultChoice HttpMultChoice

Numeric status code, 300: Multiple choices

(Inherited from HttpURLConnection)
HttpNoContent HttpNoContent

Numeric status code, 204: No content

(Inherited from HttpURLConnection)
HttpNotAcceptable HttpNotAcceptable

Numeric status code, 406: Not acceptable

(Inherited from HttpURLConnection)
HttpNotAuthoritative HttpNotAuthoritative

Numeric status code, 203: Not authoritative

(Inherited from HttpURLConnection)
HttpNotFound HttpNotFound

Numeric status code, 404: Not found

(Inherited from HttpURLConnection)
HttpNotImplemented HttpNotImplemented

Numeric status code, 501: Not implemented

(Inherited from HttpURLConnection)
HttpNotModified HttpNotModified

Numeric status code, 304: Not modified

(Inherited from HttpURLConnection)
HttpOk HttpOk

Numeric status code, 200: OK

(Inherited from HttpURLConnection)
HttpPartial HttpPartial

Numeric status code, 206: Partial

(Inherited from HttpURLConnection)
HttpPaymentRequired HttpPaymentRequired

Numeric status code, 402: Payment required

(Inherited from HttpURLConnection)
HttpPreconFailed HttpPreconFailed

Numeric status code, 412: Precondition failed

(Inherited from HttpURLConnection)
HttpProxyAuth HttpProxyAuth

Numeric status code, 407: Proxy authentication required

(Inherited from HttpURLConnection)
HttpReqTooLong HttpReqTooLong

Numeric status code, 414: Request too long

(Inherited from HttpURLConnection)
HttpReset HttpReset

Numeric status code, 205: Reset

(Inherited from HttpURLConnection)
HttpSeeOther HttpSeeOther

Numeric status code, 303: See other

(Inherited from HttpURLConnection)
HttpServerError HttpServerError

Numeric status code, 500: Internal error

(Inherited from HttpURLConnection)
HttpUnauthorized HttpUnauthorized

Numeric status code, 401: Unauthorized

(Inherited from HttpURLConnection)
HttpUnavailable HttpUnavailable

Numeric status code, 503: Unavailable

(Inherited from HttpURLConnection)
HttpUnsupportedType HttpUnsupportedType

Numeric status code, 415: Unsupported type

(Inherited from HttpURLConnection)
HttpUseProxy HttpUseProxy

Numeric status code, 305: Use proxy.

(Inherited from HttpURLConnection)
HttpVersion HttpVersion

Numeric status code, 505: Version not supported

(Inherited from HttpURLConnection)

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to