public abstract class RequestBuilder
extends java.lang.Object
Constructor and Description |
---|
RequestBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract RequestBuilder |
accept(java.lang.String mimeType) |
abstract <T> T |
connect(HttpRequests.RequestProcessor<T> processor) |
<T> T |
connect(HttpRequests.RequestProcessor<T> processor,
T errorValue,
Logger logger) |
abstract RequestBuilder |
connectTimeout(int value) |
abstract RequestBuilder |
forceHttps(boolean forceHttps) |
abstract RequestBuilder |
gzip(boolean value)
Whether gzip encoding supported.
|
abstract RequestBuilder |
hostNameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier) |
abstract RequestBuilder |
isReadResponseOnError(boolean isReadResponseOnError)
Whether to read server response on error.
|
abstract RequestBuilder |
productNameAsUserAgent() |
byte [] |
readBytes(ProgressIndicator indicator) |
java.lang.CharSequence |
readChars() |
java.lang.CharSequence |
readChars(ProgressIndicator indicator) |
java.lang.String |
readString() |
java.lang.String |
readString(ProgressIndicator indicator) |
abstract RequestBuilder |
readTimeout(int value) |
abstract RequestBuilder |
redirectLimit(int redirectLimit) |
void |
saveToFile(java.io.File file,
ProgressIndicator indicator) |
abstract RequestBuilder |
throwStatusCodeException(boolean shouldThrow)
Whether to analyze response status code and throw an exception if it's an "error" code.
|
int |
tryConnect() |
abstract RequestBuilder |
tuner(HttpRequests.ConnectionTuner tuner) |
abstract RequestBuilder |
useProxy(boolean useProxy) |
abstract RequestBuilder |
userAgent(java.lang.String userAgent) |
void |
write(byte [] data) |
void |
write(java.lang.String data) |
public abstract RequestBuilder connectTimeout(int value)
public abstract RequestBuilder readTimeout(int value)
public abstract RequestBuilder redirectLimit(int redirectLimit)
public abstract RequestBuilder gzip(boolean value)
true
.public abstract RequestBuilder forceHttps(boolean forceHttps)
public abstract RequestBuilder useProxy(boolean useProxy)
public abstract RequestBuilder hostNameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier)
public abstract RequestBuilder userAgent(java.lang.String userAgent)
public abstract RequestBuilder productNameAsUserAgent()
public abstract RequestBuilder accept(java.lang.String mimeType)
public abstract RequestBuilder tuner(HttpRequests.ConnectionTuner tuner)
public abstract RequestBuilder isReadResponseOnError(boolean isReadResponseOnError)
Throwable.getMessage()
.
Defaults to false.public abstract RequestBuilder throwStatusCodeException(boolean shouldThrow)
public abstract <T> T connect(HttpRequests.RequestProcessor<T> processor) throws java.io.IOException
java.io.IOException
public int tryConnect() throws java.io.IOException
java.io.IOException
public <T> T connect(HttpRequests.RequestProcessor<T> processor, T errorValue, Logger logger)
public void saveToFile(java.io.File file, ProgressIndicator indicator) throws java.io.IOException
java.io.IOException
public byte [] readBytes(ProgressIndicator indicator) throws java.io.IOException
java.io.IOException
public java.lang.String readString(ProgressIndicator indicator) throws java.io.IOException
java.io.IOException
public java.lang.String readString() throws java.io.IOException
java.io.IOException
public java.lang.CharSequence readChars(ProgressIndicator indicator) throws java.io.IOException
java.io.IOException
public java.lang.CharSequence readChars() throws java.io.IOException
java.io.IOException
public void write(java.lang.String data) throws java.io.IOException
java.io.IOException
public void write(byte [] data) throws java.io.IOException
java.io.IOException