public class HttpUrlConnectionSender extends java.lang.Object implements HttpSender
HttpURLConnection
-based HttpSender
.HttpSender.Method, HttpSender.Request, HttpSender.Response
Constructor and Description |
---|
HttpUrlConnectionSender()
Use the default timeouts and proxy settings for the sender.
|
HttpUrlConnectionSender(java.time.Duration connectTimeout,
java.time.Duration readTimeout)
Creates a sender with the specified timeouts but uses the default proxy settings.
|
HttpUrlConnectionSender(java.time.Duration connectTimeout,
java.time.Duration readTimeout,
java.net.Proxy proxy)
Creates a sender with the specified timeouts and proxy settings.
|
Modifier and Type | Method and Description |
---|---|
HttpSender.Response |
send(HttpSender.Request request) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete, get, head, newRequest, options, post, put
public HttpUrlConnectionSender(java.time.Duration connectTimeout, java.time.Duration readTimeout)
connectTimeout
- connect timeout when establishing a connectionreadTimeout
- read timeout when receiving a responsepublic HttpUrlConnectionSender(java.time.Duration connectTimeout, java.time.Duration readTimeout, java.net.Proxy proxy)
connectTimeout
- connect timeout when establishing a connectionreadTimeout
- read timeout when receiving a responseproxy
- proxy to use when establishing a connectionpublic HttpUrlConnectionSender()
public HttpSender.Response send(HttpSender.Request request) throws java.io.IOException
send
in interface HttpSender
java.io.IOException