Package com.newrelic.telemetry.http
Interface HttpPoster
-
public interface HttpPosterIn order to provide your own implementation of an HTTP client, an implementation of this interface must be provided.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HttpResponsepost(java.net.URL url, java.util.Map<java.lang.String,java.lang.String> headers, byte[] body, java.lang.String mediaType)Post data to the provided URL.
-
-
-
Method Detail
-
post
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
Post data to the provided URL.- Parameters:
url- http url to be reachedheaders- headers to be sentbody- body to be sentmediaType- media type definition- Returns:
- http response from the POST request
- Throws:
java.io.IOException- in case of http request error
-
-