Class HttpClient
- java.lang.Object
-
- org.datadog.jenkins.plugins.datadog.clients.HttpClient
-
public class HttpClient extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpClient(long timeoutMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(String url, Map<String,String> headers, Function<String,T> responseParser)
void
getBinary(String url, Map<String,String> headers, Consumer<InputStream> responseParser)
<T> T
post(String url, Map<String,String> headers, String contentType, byte[] body, Function<String,T> responseParser)
void
postAsynchronously(String url, Map<String,String> headers, String contentType, byte[] body)
<T> T
put(String url, Map<String,String> headers, String contentType, byte[] body, Function<String,T> responseParser)
-
-
-
Method Detail
-
get
public <T> T get(String url, Map<String,String> headers, Function<String,T> responseParser) throws ExecutionException, InterruptedException, TimeoutException
-
getBinary
public void getBinary(String url, Map<String,String> headers, Consumer<InputStream> responseParser) throws ExecutionException, InterruptedException, TimeoutException, IOException
-
put
public <T> T put(String url, Map<String,String> headers, String contentType, byte[] body, Function<String,T> responseParser) throws ExecutionException, InterruptedException, TimeoutException
-
post
public <T> T post(String url, Map<String,String> headers, String contentType, byte[] body, Function<String,T> responseParser) throws ExecutionException, InterruptedException, TimeoutException
-
-