Package io.micrometer.core.ipc.http
Class HttpUrlConnectionSender
java.lang.Object
io.micrometer.core.ipc.http.HttpUrlConnectionSender
- All Implemented Interfaces:
HttpSender
public class HttpUrlConnectionSender extends java.lang.Object implements HttpSender
HttpURLConnection
-based HttpSender
.- Since:
- 1.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micrometer.core.ipc.http.HttpSender
HttpSender.Method, HttpSender.Request, HttpSender.Response
-
Constructor Summary
Constructors Constructor 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. -
Method Summary
Modifier and Type Method Description HttpSender.Response
send(HttpSender.Request request)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micrometer.core.ipc.http.HttpSender
delete, get, head, newRequest, options, post, put
-
Constructor Details
-
HttpUrlConnectionSender
public HttpUrlConnectionSender(java.time.Duration connectTimeout, java.time.Duration readTimeout)Creates a sender with the specified timeouts but uses the default proxy settings.- Parameters:
connectTimeout
- connect timeout when establishing a connectionreadTimeout
- read timeout when receiving a response
-
HttpUrlConnectionSender
public HttpUrlConnectionSender(java.time.Duration connectTimeout, java.time.Duration readTimeout, java.net.Proxy proxy)Creates a sender with the specified timeouts and proxy settings.- Parameters:
connectTimeout
- connect timeout when establishing a connectionreadTimeout
- read timeout when receiving a responseproxy
- proxy to use when establishing a connection- Since:
- 1.2.0
-
HttpUrlConnectionSender
public HttpUrlConnectionSender()Use the default timeouts and proxy settings for the sender.
-
-
Method Details
-
send
- Specified by:
send
in interfaceHttpSender
- Throws:
java.io.IOException
-