<urlConnection>To configure HTTP authentication, use the <setAuthenticator> task.
The following attributes are mutually exclusive:
Also the following attributes and subelements are mutually exclusive:
Also the following attributes are mutually exclusive:
To debug HTTP communication, you may want to execute the following before the <urlConnection>
task:
<!-- Configure super-verbose logging on the HTTP connection. -->
<logging>
<logger name="sun.net.www.protocol.http.HttpURLConnection" level="FINEST">
<handler className="java.util.logging.ConsoleHandler">
<attribute name="level" value="FINEST" />
</handler>
</logger>
</logging>
| Name | Description |
|---|---|
allowUserInteraction="..."
|
Whether the underlying URL should be examined in a context in which it makes sense to allow user interactions, such as popping up an authentication dialog. |
connectTimeout="..."
|
The timeout, in milliseconds, to be used when opening a communications link to the resource referenced by the
underlying URLConnection.
|
direct="..."
|
Configures a direct HTTP connection, and ignores any proxy configured with the http[s].proxy(Host|Port) system properties.
|
httpChunkLength="..."
|
Enables the "chunked streaming mode". |
httpContentLength="..."
|
Enables the "fixed length streaming mode". |
httpFollowRedirects="..."
|
Whether HTTP redirects (requests with response code 3xx) should be automatically followed. |
httpFollowRedirects2="..."
|
Similar to httpFollowRedirects="...", but additionally allows for redirects across protocols,
e.g. from "http://host/index.html" to "https://host/index.html".
|
httpProxy="..."
|
Configures an HTTP proxy, and overrides any proxy configured with the http[s].proxy(Host|Port) system
properties.
|
ifModifiedSince="..."
|
Set the value of the ifModifiedSince field of the underlying URLConnection.
|
readTimeout="..."
|
The read timeout, in milliseconds. |
socksProxy="..."
|
Configures a SOCKS proxy, and overrides any proxy configured with the http[s].proxy(Host|Port) system
properties.
|
url="..."
|
Designates the resource to access. |
useCaches="..."
|
Set the value of the useCaches field of the underlying URLConnection.
|
httpRequestMethod="..."
|
| Name | Description |
|---|---|
<input>
|
Configures that the content of the resource should be retrieved. |
<output>
|
Configures that data should be copied to the resource. |
<requestProperty>
|
Configures a "request property". |
<url>
|
Designates the resource to access. |
Default values are underlined.
allowUserInteraction="true|false"connectTimeout="milliseconds"URLConnection. If the timeout expires before the connection can be established, a
SocketTimeoutException is raised. A timeout of zero is interpreted as an infinite timeout.URLConnection.setConnectTimeout(int)readTimeout="milliseconds"SocketTimeoutException is raised. A timeout of zero is interpreted as an infinite timeout.URLConnection.setReadTimeout(int)ifModifiedSince="point-of-time"ifModifiedSince field of the underlying URLConnection. useCaches="true|false"useCaches field of the underlying URLConnection.URLConnection.setUseCaches(boolean)httpChunkLength="chunk-length"httpContentLength="content-length"httpFollowRedirects="true|false"httpFollowRedirects2="true|false"httpFollowRedirects="...", but additionally allows for redirects across protocols,
e.g. from "http://host/index.html" to "https://host/index.html". url="u-r-l"direct="true|false"http[s].proxy(Host|Port) system properties. httpProxy="hostname:port"http[s].proxy(Host|Port) system
properties. <output>The following attributes and subelements are mutually exclusive:
file="..."value="..."<applicationXWwwFormUrlencoded><multipartFormData>value="..." attribute.
value="text"encoding="charset-name"value="..." is written to the resource.
file="file"<multipartFormData>
field to the output. See also RFC 2388.
Representation of a field in a 'multipart/form-data'-encoded document.The following attributes are mutually exclusive:
value="..."file="..."name="name"fileName="file-name"value="text"file="file"<applicationXWwwFormUrlencoded>
value="..."" attribute.
<input>discard="true"file="..."stderr="true"stdout="true"property="..."<jsonAsproperties>discard="true|false"stdout="true|false"stderr="true|false"file="file"append="true|false"file="..." is configured.
property="property-name"encoding="encoding"file="..." is configured.
<jsonAsProperties>
<jsonProperty>FilterChain
<url>URL.openConnection()The following attributes and subelements are mutually exclusive:
context="..."<context>context="context-url"<context> subelement described below) (defaults to none).
protocol="schema|http"host="host|localhost"port="port-number"userInfo="user-info"[ ':'password]". Defaults to none.
path="path|/"query="query-string"?"). Can alternatively be configured through <formField> subelements.
ref="anchor"<formField>
value="..."" attribute.
<context>
An alternative to context=...; must appear at most once.
(The configuration options for this element are the same as described above.)
Copyright © 2019. All rights reserved.