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

@Version("2.0") @ProviderType package org.eclipse.microprofile.rest.client.ext
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)
         }
     }

Related Packages
Package
Description
org.eclipse.microprofile.rest.client
APIs for building a type-safe RESTful client leveraging existing Jakarta RESTful Web Services APIs, for example:
org.eclipse.microprofile.rest.client.annotation
APIs for annotating MP Rest Client interfaces.
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
AsyncInvocationInterceptor
Implementations of this interface can intercept asynchronous method invocations.
AsyncInvocationInterceptorFactory
This is a provider interface intended for intercepting asynchronous method invocations.
ClientHeadersFactory
This interface is intended for generating or propagating HTTP headers.
DefaultClientHeadersFactoryImpl
This class propagates Jakarta RESTful Web Services headers whose names are specified using the MicroProfile Config property, `org.eclipse.microprofile.rest.client.propagateHeaders`.
QueryParamStyle
A QueryParamStyle enum is used to specify how multiple values are handled when constructing the query portion of the URI.
ResponseExceptionMapper<T extends Throwable>
Converts an Jakarta RESTful Web Services Response object into an Exception.