Class HttpUrlConnectionSender

  • All Implemented Interfaces:
    HttpSender

    public class HttpUrlConnectionSender
    extends java.lang.Object
    implements HttpSender
    HttpURLConnection-based HttpSender.
    Since:
    1.1.0
    • Constructor Detail

      • 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 connection
        readTimeout - 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 connection
        readTimeout - read timeout when receiving a response
        proxy - proxy to use when establishing a connection
        Since:
        1.2.0
      • HttpUrlConnectionSender

        public HttpUrlConnectionSender()
        Use the default timeouts and proxy settings for the sender.