public class HttpUrlConnectionSender extends 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(Duration connectTimeout,
Duration readTimeout)
Creates a sender with the specified timeouts but uses the default proxy settings.
|
HttpUrlConnectionSender(Duration connectTimeout,
Duration readTimeout,
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, waitdelete, get, head, newRequest, options, post, putpublic HttpUrlConnectionSender(Duration connectTimeout, Duration readTimeout)
connectTimeout - connect timeout when establishing a connectionreadTimeout - read timeout when receiving a responsepublic HttpUrlConnectionSender(Duration connectTimeout, Duration readTimeout, 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 IOException
send in interface HttpSenderIOExceptionCopyright © 2020 LeanCloud. All rights reserved.