发出请求时,我需要添加一个参数:
当前,我正在使用拦截器添加标头。但是,我反对如何向当前请求中添加参数:
@Override
public ClientHttpResponse intercept(
HttpRequest request,
byte[] body,
ClientHttpRequestExecution execution
) throws IOException {
//Adding headers
request
.getHeaders()
.set(
HttpHeaders.AUTHORIZATION,
this.jwtService.getBearer()
);
//HOW TO ADD REQUEST PARAMETER HERE???
return execution.execute(request, body);
}
有什么想法吗?