denominator.dynect.SessionTarget Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of denominator-dynect Show documentation
Show all versions of denominator-dynect Show documentation
denominator-dynect developed by Netflix
package denominator.dynect;
import javax.inject.Inject;
import denominator.Provider;
import denominator.dynect.InvalidatableTokenProvider.Session;
import feign.Request;
import feign.RequestTemplate;
import feign.Target;
class SessionTarget implements Target {
private final Provider provider;
@Inject
SessionTarget(Provider provider) {
this.provider = provider;
}
@Override
public Class type() {
return Session.class;
}
@Override
public String name() {
return provider.name();
}
@Override
public String url() {
return provider.url();
}
@Override
public Request apply(RequestTemplate input) {
input.header("API-Version", "3.5.0");
input.header("Content-Type", "application/json");
input.insert(0, url());
return input.request();
}
};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy