public class HeaderSettingRequestInterceptor extends Object implements org.springframework.http.client.ClientHttpRequestInterceptor
| Constructor and Description |
|---|
HeaderSettingRequestInterceptor(Map<String,String> headers)
Construct interceptor for setting given HTTP headers.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.client.ClientHttpResponse |
intercept(org.springframework.http.HttpRequest request,
byte[] body,
org.springframework.http.client.ClientHttpRequestExecution execution)
Intercept the given request, set headers passed to constructor, and return a response.
|
public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request,
byte[] body,
org.springframework.http.client.ClientHttpRequestExecution execution)
throws IOException
ClientHttpRequestExecution allows the interceptor
to pass on the request and response to the next entity in the chain.intercept in interface org.springframework.http.client.ClientHttpRequestInterceptorrequest - the request, containing method, URI, and headersbody - the body of the requestexecution - the request executionIOException - in case of I/O errorsCopyright © 2019. All rights reserved.