Interface HttpRequestHeaderInterceptor.Builder

Enclosing class:
HttpRequestHeaderInterceptor

public static interface HttpRequestHeaderInterceptor.Builder
Since:
2.0.0
Author:
Rossen Stoyanchev
  • Method Details

    • mapHeader

      HttpRequestHeaderInterceptor.Builder mapHeader(String... headerName)
      Add names of HTTP headers to copy to the GraphQL context, using keys identical to the header names. Only the first value is copied.
      Parameters:
      headerName - the name(s) of header(s) to copy
    • mapHeaderToKey

      HttpRequestHeaderInterceptor.Builder mapHeaderToKey(String headerName, String contextKey)
      Add a mapping between an HTTP header name and the key under which it should appear in the GraphQL context. Only the first value is copied.
      Parameters:
      headerName - the name of a header to copy
      contextKey - the key to map to in the GraphQL context
    • mapMultiValueHeader

      HttpRequestHeaderInterceptor.Builder mapMultiValueHeader(String... headerName)
      Add names of HTTP headers to copy to the GraphQL context, using keys identical to the header names. All values are copied as a List.
      Parameters:
      headerName - the name(s) of header(s) to copy
    • mapMultiValueHeaderToKey

      HttpRequestHeaderInterceptor.Builder mapMultiValueHeaderToKey(String headerName, String contextKey)
      Add a mapping between an HTTP header name and the key under which it should appear in the GraphQL context. All values are copied as a List.
      Parameters:
      headerName - the name of a header to copy
      contextKey - the key to map to in the GraphQL context
    • build

      Create the interceptor instance.