Java.Net.HttpURLConnection Members

The members of Java.Net.HttpURLConnection are listed below.

See Also: Inherited members from Java.Net.URLConnection

Protected Constructors

Constructs a new HttpURLConnection instance pointing to the resource specified by the url.
A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
HttpAcceptedHttpStatus (202). Numeric status code, 202: Accepted
const
HttpBadGatewayHttpStatus (502). Numeric status code, 502: Bad Gateway
const
HttpBadMethodHttpStatus (405). Numeric status code, 405: Bad Method
const
HttpBadRequestHttpStatus (400). Numeric status code, 400: Bad Request
const
HttpClientTimeoutHttpStatus (408). Numeric status code, 408: Client Timeout
const
HttpConflictHttpStatus (409). Numeric status code, 409: Conflict
const
HttpCreatedHttpStatus (201). Numeric status code, 201: Created
const
HttpEntityTooLargeHttpStatus (413). Numeric status code, 413: Entity too large
const
HttpForbiddenHttpStatus (403). Numeric status code, 403: Forbidden
const
HttpGatewayTimeoutHttpStatus (504). Numeric status code, 504: Gateway timeout
const
HttpGoneHttpStatus (410). Numeric status code, 410: Gone
const
HttpInternalErrorHttpStatus (500). Numeric status code, 500: Internal error
const
HttpLengthRequiredHttpStatus (411). Numeric status code, 411: Length required
const
HttpMovedPermHttpStatus (301). Numeric status code, 301 Moved permanently
const
HttpMovedTempHttpStatus (302). Numeric status code, 302: Moved temporarily
const
HttpMultChoiceHttpStatus (300). Numeric status code, 300: Multiple choices
const
HttpNoContentHttpStatus (204). Numeric status code, 204: No content
const
HttpNotAcceptableHttpStatus (406). Numeric status code, 406: Not acceptable
const
HttpNotAuthoritativeHttpStatus (203). Numeric status code, 203: Not authoritative
const
HttpNotFoundHttpStatus (404). Numeric status code, 404: Not found
const
HttpNotImplementedHttpStatus (501). Numeric status code, 501: Not implemented
const
HttpNotModifiedHttpStatus (304). Numeric status code, 304: Not modified
const
HttpOkHttpStatus (200). Numeric status code, 200: OK
const
HttpPartialHttpStatus (206). Numeric status code, 206: Partial
const
HttpPaymentRequiredHttpStatus (402). Numeric status code, 402: Payment required
const
HttpPreconFailedHttpStatus (412). Numeric status code, 412: Precondition failed
const
HttpProxyAuthHttpStatus (407). Numeric status code, 407: Proxy authentication required
const
HttpReqTooLongHttpStatus (414). Numeric status code, 414: Request too long
const
HttpResetHttpStatus (205). Numeric status code, 205: Reset
const
HttpSeeOtherHttpStatus (303). Numeric status code, 303: See other
const
HttpServerErrorHttpStatus (500). Numeric status code, 500: Internal error
const
HttpUnauthorizedHttpStatus (401). Numeric status code, 401: Unauthorized
const
HttpUnavailableHttpStatus (503). Numeric status code, 503: Unavailable
const
HttpUnsupportedTypeHttpStatus (415). Numeric status code, 415: Unsupported type
const
HttpUseProxyHttpStatus (305). Numeric status code, 305: Use proxy.
const
HttpVersionHttpStatus (505). Numeric status code, 505: Version not supported

Public Properties

[read-only]
ErrorStreamSystem.IO.Stream. 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.
static
FollowRedirectsbool. Returns the value of followRedirects which indicates if this connection follows a different URL redirected by the server.
InstanceFollowRedirectsbool. Returns whether this connection follows redirects.
RequestMethodstring. Returns the request method which will be used to make the request to the remote HTTP server.
[read-only]
ResponseCodeHttpStatus. Returns the response code returned by the remote HTTP server.
[read-only]
ResponseMessagestring. Returns the response message returned by the remote HTTP server.

Protected Properties

ChunkLengthint. If the HTTP chunked encoding is enabled this parameter defines the chunk-length.
FixedContentLengthint. The byte count in the request body if it is both known and streamed; and -1 otherwise.
FixedContentLengthLonglong. The byte count in the request body if it is both known and streamed; and -1 otherwise.
Methodstring. The HTTP request method of this HttpURLConnection.
[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

abstract
Disconnect()
Releases this connection so that its resources may be either reused or closed.
SetChunkedStreamingMode(int)
Stream a request body whose length is not known in advance.
SetFixedLengthStreamingMode(int)
Equivalent to setFixedLengthStreamingMode((long) contentLength), but available on earlier versions of Android and limited to 2 GiB.
SetFixedLengthStreamingMode(long)
Configures this connection to stream the request body with the known fixed byte count of contentLength.
abstract
UsingProxy() : bool
Returns whether this connection uses a proxy server or not.