Skip navigation links

Package org.eclipse.microprofile.rest.client.ext

APIs for extending MP Rest Client functionality - such as new providers.

See: Description

Package org.eclipse.microprofile.rest.client.ext Description

APIs for extending MP Rest Client functionality - such as new providers. Example:
 @RegisterProvider(UnknownWidgetExceptionMapper.class)
 public interface MyClientService {
     @GET
     @Path("/myService/{id}")
     Widget getWidget(@PathParam("id") String id) throws UnknownWidgetException;
 }
 ...
 public class UnknownWidgetExceptionMapper implements ResponseExceptionMapper {

     @Override
     UnknownWidgetException toThrowable(Response response) {
         String msg = "Could not find widget with ID of " + response.getHeaderString("WidgetId");
         return new UnknownWidgetException(msg)
     }
 }
 
Skip navigation links