Class HttpHeaderInterceptor

  • All Implemented Interfaces:
    org.springframework.http.client.ClientHttpRequestInterceptor

    public class HttpHeaderInterceptor
    extends Object
    implements org.springframework.http.client.ClientHttpRequestInterceptor
    ClientHttpRequestInterceptor to populate arbitrary HTTP headers with a value. For example, it might be used to provide an X-AUTH-TOKEN and value for security purposes.
    Since:
    1.3.0
    • Constructor Detail

    • Method Detail

      • intercept

        public org.springframework.http.client.ClientHttpResponse intercept​(org.springframework.http.HttpRequest request,
                                                                            byte[] body,
                                                                            org.springframework.http.client.ClientHttpRequestExecution execution)
                                                                     throws IOException
        Specified by:
        intercept in interface org.springframework.http.client.ClientHttpRequestInterceptor
        Throws:
        IOException