I'm trying to access a resource with like http://192.168.1.64:5050/api/{api_key}/updater.info
.
How would I dynamically set the api_key
parameter? I've tried using a RequestInterceptor
without success where the base url is http://192.168.1.64:5050/api/{api_key}
.
@Override
public void intercept(RequestFacade request) {
request.addPathParam("api_key", apiKey);
}
Are there any other alternatives?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…