Releases: eclipse/microprofile-rest-client
MicroProfile Rest Client 1.2 Release Candidate 1
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Generate headers en masse, including propagation of headers from inbound JAX-RS requests.
- New
@ClientHeaderParam
API for defining HTTP headers without modifying the client interface method signature. - New section documenting the integration of MP Rest Client with other MP technologies - including CDI interceptors and Fault Tolerance.
- Clarification on built-in JSON-B/JSON-P entity providers.
- Declare the base URI directly from the
@RegisterRestClient
annotation with the newbaseUri
property. - Portable control of connection and read timeouts using new
connectTimeout
andreadTimeout
methods onRestClientBuilder
and corresponding MP Config properties. - Client filters can obtain the Rest Client interface method being invoked via a new property in the
ClientRequestContext
. - New SPI interface,
RestClientListener
interface for intercepting new client instances. - New
removeContext
method inAsyncInvocationInterceptor
interface for clearing contexts from the async thread.
MP Rest Client 1.2 Milestone 2
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Clarification on built-in JSON-B/JSON-P entity providers.
- Declare the base URI directly from the
@RegisterRestClient
annotation with the newbaseUri
property. - Portable control of connection and read timeouts using new
connectTimeout
andreadTimeout
methods onRestClientBuilder
and corresponding MP Config properties. - Client filters can obtain the Rest Client interface method being invoked via a new property in the
ClientRequestContext
. - New SPI interface,
RestClientListener
interface for intercepting new client instances. - New
removeContext
method inAsyncInvocationInterceptor
interface for clearing contexts from the async thread.
MP Rest Client 1.2 Milestone 1
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Declare the base URI directly from the
@RegisterRestClient
annotation with the newbaseUri
property. - Portable control of connection and read timeouts using new
connectTimeout
andreadTimeout
methods onRestClientBuilder
and corresponding MP Config properties. - Client filters can obtain the Rest Client interface method being invoked via a new property in the
ClientRequestContext
. - New SPI interface,
RestClientListener
interface for intercepting new client instances. - New
removeContext
method inAsyncInvocationInterceptor
interface for clearing contexts from the async thread.
Eclipse MicroProfile Rest Client 1.1
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Asynchronous Methods - to use, just update the return type of your Rest Client methods to be
CompletionStage
. RestClientBuilderListener
- now products can plug in and register providers, update config properties, etc. prior to the creation of new client instances. This enables other MicroProfile technologies, like Open Tracing to automatically add their client request/response filters to MP Rest Clients.- Supports
java.net.URI
in addition tojava.net.URL
. @RegisterRestClient
is now a bean-defining annotation - no longer need to add@Dependent
annotation to the client interface.
Eclipse MicroProfile Rest Client 1.1 (RC2)
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Asynchronous Methods - to use, just update the return type of your Rest Client methods to be
CompletionStage
. RestClientBuilderListener
- now products can plug in and register providers, update config properties, etc. prior to the creation of new client instances. This enables other MicroProfile technologies, like Open Tracing to automatically add their client request/response filters to MP Rest Clients.- Supports
java.net.URI
in addition tojava.net.URL
. @RegisterRestClient
is now a bean-defining annotation - no longer need to add@Dependent
annotation to the client interface.
Eclipse MicroProfile Rest Client 1.1-RC1
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Asynchronous Methods - to use, just update the return type of your Rest Client methods to be
CompletionStage
. RestClientBuilderListener
- now products can plug in and register providers, update config properties, etc. prior to the creation of new client instances. This enables other MicroProfile technologies, like Open Tracing to automatically add their client request/response filters to MP Rest Clients.- Supports
java.net.URI
in addition tojava.net.URL
. @RegisterRestClient
is now a bean-defining annotation - no longer need to add@Dependent
annotation to the client interface.
Eclipse MicroProfile Rest Client 1.0.1
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Updates for Java 2 security
- Updates to the TCK
Eclipse MicroProfile Rest Client 1.0
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Built in alignment to other MicroProfile Specs - automatic registration of JSON provider, CDI support for injecting clients, fully configurable clients via MicroProfile Config
- Can map JAX-RS
Response
objects intoException
s to be handled by your client code - Fully declarative annotation driven configuration, with supported builder patterns
- Closely aligned to JAX-RS with configuration and behavior based on the JAX-RS
Client
object
To get started, simply add this dependency to your project, assuming you have an implementation available:
<dependency>
<groupId>org.eclipse.microprofile.rest.client</groupId>
<artifactId>microprofile-rest-client-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
And then programmatically create an interface:
public interface SimpleGetApi {
@GET
Response executeGet();
}
// in your client code
SimpleGetApi simpleGetApi = RestClientBuilder.newBuilder()
.baseUrl(getApplicationUrl())
.build(SimpleGetApi.class);
or you can use CDI to inject it:
@Path("/")
@Dependent
@RegisterRestClient
public interface SimpleGetApi {
@GET
Response executeGet();
}
// in your client code
@Inject
private SimpleGetApi simpleGetApi
// in your config source
com.mycompany.myapp.client.SimpleGetApi/mp-rest/url=http://microprofile.io
MicroProfile Rest Client 1.0 RC3
This is the final pre-release of the rest client spec.
MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs
Key features:
- Built in alignment to other MicroProfile Specs - automatic registration of JSON provider, CDI support for injecting clients, fully configurable clients via MicroProfile Config
- Can map JAX-RS
Response
objects intoException
s to be handled by your client code - Fully declarative annotation driven configuration, with supported builder patterns
- Closely aligned to JAX-RS with configuration and behavior based on the JAX-RS
Client
object
To get started, simply add this dependency to your project, assuming you have an implementation available:
<dependency>
<groupId>org.eclipse.microprofile.rest.client</groupId>
<artifactId>microprofile-rest-client-api</artifactId>
<version>1.0-RC3</version>
<scope>provided</scope>
</dependency>
And then programmatically create an interface:
public interface SimpleGetApi {
@GET
Response executeGet();
}
// in your client code
SimpleGetApi simpleGetApi = RestClientBuilder.newBuilder()
.baseUrl(getApplicationUrl())
.build(SimpleGetApi.class);
or you can use CDI to inject it:
@Path("/")
@Dependent
@RegisterRestClient
public interface SimpleGetApi {
@GET
Response executeGet();
}
// in your client code
@Inject
private SimpleGetApi simpleGetApi
// in your config source
com.mycompany.myapp.client.SimpleGetApi/mp-rest/url=http://microprofile.io