T - type of the interface this target applies to.public interface Target<T>
javax.ws.rs.client.WebTarget, as it produces requests. However, RequestTemplate is a
closer match to WebTarget.| Modifier and Type | Interface and Description |
|---|---|
static class |
Target.EmptyTarget<T> |
static class |
Target.HardCodedTarget<T> |
| Modifier and Type | Method and Description |
|---|---|
Request |
apply(RequestTemplate input)
Targets a template to this target, adding the
base url and any target-specific
headers or query parameters. |
String |
name() |
Class<T> |
type() |
String |
url() |
String name()
String url()
Request apply(RequestTemplate input)
base url and any target-specific
headers or query parameters.
public Request apply(RequestTemplate input) {
input.insert(0, url());
input.replaceHeader("X-Auth", currentToken);
return input.asRequest();
}
javax.ws.rs.client.WebTarget.request(), except that we expect transient, but necessary
decoration to be applied on invocation.Copyright © 2012–2016 OpenFeign. All rights reserved.