Package com.naver.ads.network.raw
Class HttpClient
-
- All Implemented Interfaces:
public final class HttpClient
-
-
Method Summary
Modifier and Type Method Description final static HttpResponseexecute(HttpRequest $self, Long timeoutMillis)Synchronously executes request on the current thread and blocks while waiting for at most the given time for the response. final static HttpResponseexecute(HttpRequest $self)Synchronously executes request on the current thread and blocks while waiting for at most the given time for the response. final static Unitenqueue(HttpRequest $self, HttpCallback callback)Asynchronously send the request. -
-
Method Detail
-
execute
final static HttpResponse execute(HttpRequest $self, Long timeoutMillis)
Synchronously executes request on the current thread and blocks while waiting for at most the given time for the response.
- Parameters:
timeoutMillis- time to wait before cancelling the operation.- Returns:
the computed response
-
execute
final static HttpResponse execute(HttpRequest $self)
Synchronously executes request on the current thread and blocks while waiting for at most the given time for the response.
- Returns:
the computed response
-
enqueue
final static Unit enqueue(HttpRequest $self, HttpCallback callback)
Asynchronously send the request.
- Parameters:
callback- the HTTP callback that notify of its successful response or error
-
-
-
-