public final class HttpUrlConnectionExecutor
extends java.lang.Object
implements org.dmfs.httpessentials.client.HttpRequestExecutor
HttpRequestExecutor that's based on Java's HttpUrlConnection.
Note that this implementation is constrained by the underlying HttpURLConnection implementation. In particular that means you should not rely on
being able to use certain HTTP methods like PROPFIND. Standard HTTP methods should always work though.
Also note that this, by convention, won't follow redirects.| Constructor and Description |
|---|
HttpUrlConnectionExecutor()
Creates an
HttpUrlConnectionExecutor using a Finite DefaultHttpUrlConnectionFactory with default timeouts. |
HttpUrlConnectionExecutor(HttpUrlConnectionFactory connectionFactory)
Creates an
HttpUrlConnectionExecutor that uses the given HttpUrlConnectionFactory. |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(java.net.URI uri,
org.dmfs.httpessentials.client.HttpRequest<T> request) |
public HttpUrlConnectionExecutor()
HttpUrlConnectionExecutor using a Finite DefaultHttpUrlConnectionFactory with default timeouts.public HttpUrlConnectionExecutor(HttpUrlConnectionFactory connectionFactory)
HttpUrlConnectionExecutor that uses the given HttpUrlConnectionFactory.connectionFactory - public <T> T execute(java.net.URI uri,
org.dmfs.httpessentials.client.HttpRequest<T> request)
throws java.io.IOException,
org.dmfs.httpessentials.exceptions.ProtocolError,
org.dmfs.httpessentials.exceptions.ProtocolException,
org.dmfs.httpessentials.exceptions.RedirectionException,
org.dmfs.httpessentials.exceptions.UnexpectedStatusException
execute in interface org.dmfs.httpessentials.client.HttpRequestExecutorjava.io.IOExceptionorg.dmfs.httpessentials.exceptions.ProtocolErrororg.dmfs.httpessentials.exceptions.ProtocolExceptionorg.dmfs.httpessentials.exceptions.RedirectionExceptionorg.dmfs.httpessentials.exceptions.UnexpectedStatusException