Class TaskIdSupplierHttpRequestInterceptor

java.lang.Object
org.hawaiiframework.async.http.TaskIdSupplierHttpRequestInterceptor
All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor

public class TaskIdSupplierHttpRequestInterceptor extends Object implements org.springframework.http.client.ClientHttpRequestInterceptor
HTTP request interceptor to set a task id as a header on an HTTP request.
Since:
2.0.0
  • Constructor Details

    • TaskIdSupplierHttpRequestInterceptor

      public TaskIdSupplierHttpRequestInterceptor()
      Default constructor with 'X-Hawaii-Task-Id' as headername.
    • TaskIdSupplierHttpRequestInterceptor

      public TaskIdSupplierHttpRequestInterceptor(String headerName)
      Constructor that sets the header name.
      Parameters:
      headerName - The header name to use.
  • Method Details

    • 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