@Singleton
public final class HttpHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpHelper.Response
An HTTP Response.
|
| Constructor and Description |
|---|
HttpHelper(iep.com.netflix.iep.http.RxHttp rxHttp)
Create a new HttpHelper using the given
RxHttp instance. |
| Modifier and Type | Method and Description |
|---|---|
HttpHelper.Response |
get(iep.io.reactivex.netty.protocol.http.client.HttpClientRequest<io.netty.buffer.ByteBuf> req,
long timeout,
java.util.concurrent.TimeUnit timeUnit)
Perform an HTTP get in the allowed time.
|
iep.com.netflix.iep.http.RxHttp |
getRxHttp()
Get the underlying
RxHttp instance. |
rx.Observable<iep.io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>> |
postSmile(java.lang.String uriStr,
JsonPayload payload)
POST to the given URI the passed
JsonPayload. |
int |
sendAll(java.lang.Iterable<rx.Observable<java.lang.Integer>> batches,
int numMetrics,
long timeoutMillis)
Attempt to send all the batches totalling numMetrics in the allowed time.
|
@Inject public HttpHelper(iep.com.netflix.iep.http.RxHttp rxHttp)
RxHttp instance.public iep.com.netflix.iep.http.RxHttp getRxHttp()
RxHttp instance.public rx.Observable<iep.io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>> postSmile(java.lang.String uriStr,
JsonPayload payload)
JsonPayload.public int sendAll(java.lang.Iterable<rx.Observable<java.lang.Integer>> batches,
int numMetrics,
long timeoutMillis)
public HttpHelper.Response get(iep.io.reactivex.netty.protocol.http.client.HttpClientRequest<io.netty.buffer.ByteBuf> req, long timeout, java.util.concurrent.TimeUnit timeUnit)