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

@Version("2.0") @ProviderType package org.eclipse.microprofile.rest.client.inject
APIs to aid in CDI-based injection of MP Rest Client implementations. These annotations are used both to mark an interface as registered Rest Client and also to designate that an implementation of that interface should be injected at a specific injection point. Example:

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

     ...
     @ApplicationScoped
     public class MyBean {
         @Inject
         @RestClient
         MyClientService service;
         ...
     }

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.ext
APIs for extending MP Rest Client functionality - such as new providers.
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
RegisterRestClient
A marker annotation to register a rest client at runtime.
RestClient
Use the RestClient qualifier on an injection to point to indicate that this injection point is meant to use an instance of a Type-Safe Rest Client.
RestClient.RestClientLiteral