# Package org.eclipse.microprofile.rest.client

@Version("2.1") @ProviderType package org.eclipse.microprofile.rest.client
APIs for building a type-safe RESTful client leveraging existing Jakarta RESTful Web Services APIs, for example:

     public interface MyClientService {
         @GET
         @Path("/myService/{id}")
         Widget getWidget(@PathParam("id") String id);
     }

     ...

     MyClientService service = RestClientBuilder.newBuilder()
                                                .baseUrl(url)
                                                .build();
     Widget w = service.getWidget(widgetId); // invokes remote service, returns domain object

Since:
  1.0

Related Packages
Package
Description
org.eclipse.microprofile.rest.client.annotation
APIs for annotating MP Rest Client interfaces.
org.eclipse.microprofile.rest.client.ext
APIs for extending MP Rest Client functionality - such as new providers.
org.eclipse.microprofile.rest.client.inject
APIs to aid in CDI-based injection of MP Rest Client implementations.
org.eclipse.microprofile.rest.client.spi
SPIs for MP Rest Client implementations or system-level components that provide additional functionality for MP Rest Clients.
Class
Description
RestClientBuilder
This is the main entry point for creating a Type Safe Rest Client.
RestClientDefinitionException
This exception is thrown when the MicroProfile Rest Client implementation attempts to build a client using an invalid interface.