lucee.Componentcfboom.lang.Object
cfboom.http.client.SimpleClientHttpRequestFactory
{@link ClientHttpRequestFactory} implementation that uses standard JDK facilities.
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
HttpMethod
|
true
|
false
|
|
any
|
wirebox
|
true
|
false
|
Constructor Summary | |
---|---|
init()
|
Method Summary | |
---|---|
ClientHttpRequest
|
createRequest(any uri, [HttpMethod httpMethod])
|
any
|
openConnection(any theUrl)
Opens and returns a connection to the given URL. |
void
|
prepareConnection(any connection, string httpMethod)
Template method for preparing the given {@link HttpURLConnection}. |
void
|
setBufferRequestBody(boolean bufferRequestBody)
Indicate whether this request factory should buffer the. |
void
|
setChunkSize(numeric chunkSize)
Set the number of bytes to write in each chunk when not buffering request. |
void
|
setConnectTimeout(numeric connectTimeout)
Set the underlying URLConnection's connect timeout (in milliseconds). |
void
|
setOutputStreaming(boolean outputStreaming)
Set if the underlying URLConnection can be set to 'output streaming' mode. |
void
|
setReadTimeout(numeric readTimeout)
Set the underlying URLConnection's read timeout (in milliseconds). |
void
|
setStandardRequestBody(boolean standardRequestBody)
Indicate whether this request factory should use ColdFusion HTTP. |
Methods inherited from class cfboom.lang.Object |
---|
$equals, getComponentName, getIdentityHashCode, getIdentityString, getMeta, hashCode, toString |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- HttpMethod@cfboom-httpserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- wireboxserializable
- trueMethod Detail |
---|
createRequest
in interface
ClientHttpRequestFactory
uri
httpMethod
Opens and returns a connection to the given URL.
The default implementation uses the given {@linkplain #setProxy(java.net.Proxy) proxy} - if any - to open a connection.
theUrl
Template method for preparing the given {@link HttpURLConnection}.
The default implementation prepares the connection for input and output, and sets the HTTP method.
connection
httpMethod
Indicate whether this request factory should buffer the {@linkplain ClientHttpRequest#getBody() request body} internally.
Default is {@code true}. When sending large amounts of data via POST or PUT, it is recommended to change this property to {@code false}, so as not to run out of memory. This will result in a {@link ClientHttpRequest} that either streams directly to the underlying {@link HttpURLConnection} (if the {@link org.springframework.http.HttpHeaders#getContentLength() Content-Length} is known in advance), or that will use "Chunked transfer encoding" (if the {@code Content-Length} is not known in advance).
bufferRequestBody
Set the number of bytes to write in each chunk when not buffering request bodies locally.
Note that this parameter is only used when {@link #setBufferRequestBody(boolean) bufferRequestBody} is set to {@code false}, and the {@link org.springframework.http.HttpHeaders#getContentLength() Content-Length} is not known in advance.
chunkSize
Set the underlying URLConnection's connect timeout (in milliseconds). A timeout value of 0 specifies an infinite timeout.
Default is the system's default timeout.
connectTimeout
Set if the underlying URLConnection can be set to 'output streaming' mode. Default is {@code true}.
When output streaming is enabled, authentication and redirection cannot be handled automatically. If output streaming is disabled, the {@link HttpURLConnection#setFixedLengthStreamingMode} and {@link HttpURLConnection#setChunkedStreamingMode} methods of the underlying connection will never be called.
outputStreaming
Set the underlying URLConnection's read timeout (in milliseconds). A timeout value of 0 specifies an infinite timeout.
Default is the system's default timeout.
readTimeout
Indicate whether this request factory should use ColdFusion HTTP.
standardRequestBody