public B exposeHeaders(CharSequence... headers) {
        requireNonNull(headers, "headers");
        checkArgument(headers.length > 0, "headers should not be empty.");
        for (int i = 0; i < headers.length; i++) {
            if (headers[i] == null) {
                throw new NullPointerException("headers[" + i + ']');
            }
        }

        Arrays.stream(headers).map(HttpHeaderNames::of).forEach(exposedHeaders::add);
        return self();
    }
public B exposeHeaders ( CharSequence ... headers ) { requireNonNull ( headers , "headers" ) ; checkArgument ( headers . length > 0 , "headers should not be empty." ) ; for ( int i = 0 ; i < headers . length ; i ++ ) { if ( headers [ i ] == null ) { throw new NullPointerException ( "headers[" + i + ']' ) ; } } Arrays . stream ( headers ) . map ( HttpHeaderNames :: of ) . forEach ( exposedHeaders :: add ) ; return self ( ) ; }
Specifies the headers to be exposed to calling clients.

<p>During a simple CORS request, only certain response headers are made available by the
browser, for example using:
<pre>{@code
xhr.getResponseHeader("Content-Type");
}</pre>

<p>The headers that are available by default are:
<ul>
<li>{@code Cahce-Control}</li>
<li>{@code Content-Language}</li>
<li>{@code Content-Type}</li>
<li>{@code Expires}</li>
<li>{@code Last-Modified}</li>
<li>{@code Pragma}</li>
</ul>

<p>To expose other headers they need to be specified which is what this method enables by
adding the headers to the CORS {@code "Access-Control-Expose-Headers"} response header.

@param headers the values to be added to the {@code "Access-Control-Expose-Headers"} response header
@return {@code this} to support method chaining.