Package feign
Interface Target<T>
-
- Type Parameters:
T- type of the interface this target applies to.
- All Known Implementing Classes:
Target.EmptyTarget,Target.HardCodedTarget
public interface Target<T>
relationship to JAXRS 2.0
Similar tojavax.ws.rs.client.WebTarget, as it produces requests. However,RequestTemplateis a closer match toWebTarget.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTarget.EmptyTarget<T>static classTarget.HardCodedTarget<T>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Requestapply(RequestTemplate input)Targets a template to this target, adding thebase urland any target-specific headers or query parameters.java.lang.Stringname()java.lang.Class<T>type()java.lang.Stringurl()
-
-
-
Method Detail
-
type
java.lang.Class<T> type()
-
name
java.lang.String name()
-
url
java.lang.String url()
-
apply
Request apply(RequestTemplate input)
Targets a template to this target, adding thebase urland any target-specific headers or query parameters.
For example:
public Request apply(RequestTemplate input) { input.insert(0, url()); input.replaceHeader("X-Auth", currentToken); return input.asRequest(); }
relationship to JAXRS 2.0
This call is similar tojavax.ws.rs.client.WebTarget.request(), except that we expect transient, but necessary decoration to be applied on invocation.
-
-