- java.lang.Object
-
- com.rabbitmq.http.client.JdkHttpClientHttpLayer
-
- All Implemented Interfaces:
HttpLayer
public final class JdkHttpClientHttpLayer extends Object implements HttpLayer
HttpLayer
using JDK 11'sHttpClient
.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JdkHttpClientHttpLayer.Configuration
Class to configure the defaultHttpLayer
implementation.-
Nested classes/interfaces inherited from interface com.rabbitmq.http.client.HttpLayer
HttpLayer.HttpLayerFactory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
authorization(String username, String password)
static JdkHttpClientHttpLayer.Configuration
configure()
Configure the defaultHttpLayer
implementation.void
delete(URI uri, Map<String,String> headers)
DELETE operation.<T> T
get(URI uri, com.rabbitmq.http.client.ParameterizedTypeReference<T> typeReference)
Get operation when the expected class uses generics, likeList<T>
orPage<T>
.<T> T
get(URI uri, Class<T> responseClass)
GET operation when the expected class does not use generics.<T> T
post(URI uri, Object requestBody, Class<T> responseClass)
POST operation.void
put(URI uri, Object requestBody)
PUT operation.
-
-
-
Method Detail
-
configure
public static JdkHttpClientHttpLayer.Configuration configure()
Configure the defaultHttpLayer
implementation.- Returns:
- a configuration instance
-
get
public <T> T get(URI uri, Class<T> responseClass)
Description copied from interface:HttpLayer
GET operation when the expected class does not use generics.
-
get
public <T> T get(URI uri, com.rabbitmq.http.client.ParameterizedTypeReference<T> typeReference)
Description copied from interface:HttpLayer
Get operation when the expected class uses generics, likeList<T>
orPage<T>
.
-
post
public <T> T post(URI uri, Object requestBody, Class<T> responseClass)
Description copied from interface:HttpLayer
POST operation.Response class is optional.
-
put
public void put(URI uri, Object requestBody)
Description copied from interface:HttpLayer
PUT operation.
-
-