Interface HttpRequestHeaderInterceptor.Builder
- Enclosing class:
HttpRequestHeaderInterceptor
public static interface HttpRequestHeaderInterceptor.Builder
Builder for
HttpRequestHeaderInterceptor.- Since:
- 2.0.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create the interceptor instance.Add names of HTTP headers to copy to the GraphQL context, using keys identical to the header names.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.mapMultiValueHeader(String... headerName) Add names of HTTP headers to copy to the GraphQL context, using keys identical to the header names.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.
-
Method Details
-
mapHeader
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
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 copycontextKey- the key to map to in the GraphQL context
-
mapMultiValueHeader
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
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 copycontextKey- the key to map to in the GraphQL context
-
build
HttpRequestHeaderInterceptor build()Create the interceptor instance.
-