Package com.newrelic.jfr.daemon
Class OkHttpPoster
- java.lang.Object
-
- com.newrelic.jfr.daemon.OkHttpPoster
-
- All Implemented Interfaces:
com.newrelic.telemetry.http.HttpPoster
public class OkHttpPoster extends java.lang.Object implements com.newrelic.telemetry.http.HttpPoster
-
-
Constructor Summary
Constructors Constructor Description OkHttpPoster(java.net.Proxy proxy, okhttp3.Authenticator proxyAuthenticator, java.time.Duration callTimeout)Create an OkHttpPoster with a Proxy.OkHttpPoster(java.time.Duration callTimeout)Create an OkHttpPoster without a Proxy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.newrelic.telemetry.http.HttpResponsepost(java.net.URL url, java.util.Map<java.lang.String,java.lang.String> headers, byte[] body, java.lang.String mediaType)
-
-
-
Constructor Detail
-
OkHttpPoster
public OkHttpPoster(java.time.Duration callTimeout)
Create an OkHttpPoster without a Proxy.- Parameters:
callTimeout- call timeout
-
OkHttpPoster
public OkHttpPoster(java.net.Proxy proxy, okhttp3.Authenticator proxyAuthenticator, java.time.Duration callTimeout)Create an OkHttpPoster with a Proxy.- Parameters:
proxy- the ProxyproxyAuthenticator- the proxy AuthenticatorcallTimeout- call timeout
-
-
Method Detail
-
post
public com.newrelic.telemetry.http.HttpResponse post(java.net.URL url, java.util.Map<java.lang.String,java.lang.String> headers, byte[] body, java.lang.String mediaType) throws java.io.IOException- Specified by:
postin interfacecom.newrelic.telemetry.http.HttpPoster- Throws:
java.io.IOException
-
-