callouts/java/service-callout/src/main/java/example/AddHeader.java [52:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            return this;
        }
    }

    /**
     * Modifies the incoming request headers by adding specific key-value pairs.
     * <p>
     * This method appends two headers, "request-header" with the value "added-request" and "c" with "d",
     * while clearing the route cache to ensure the new route is calculated.
     *
     * @param processingResponseBuilder the builder used to construct the {@link ProcessingResponse}.
     * @param headers the {@link HttpHeaders} representing the original request headers.
     */
    @Override
    public void onRequestHeaders(ProcessingResponse.Builder processingResponseBuilder,
                                 HttpHeaders headers) {

        // Modify headers for the request
        addHeaderMutations(
                processingResponseBuilder.getRequestHeadersBuilder(),
                ImmutableMap.of("request-header", "added-request", "c", "d").entrySet(),  // Headers to add
                null,  // No headers to remove
                true,  // Clear route cache
                null   // No append action
        );
    }

    /**
     * Modifies the outgoing response headers by adding new headers and removing existing ones.
     * <p>
     * This method appends two headers, "response-header" with the value "added-response" and "c" with "d",
     * while removing the "foo" header. It does not clear the route cache.
     *
     * @param processingResponseBuilder the builder used to construct the {@link ProcessingResponse}.
     * @param headers the {@link HttpHeaders} representing the original response headers.
     */
    @Override
    public void onResponseHeaders(ProcessingResponse.Builder processingResponseBuilder,
                                  HttpHeaders headers) {
        // Modify headers for the response
        addHeaderMutations(
                processingResponseBuilder.getResponseHeadersBuilder(),
                ImmutableMap.of("response-header", "added-response", "c", "d").entrySet(),  // Headers to add
                ImmutableList.of("foo"),  // Headers to remove
                false,  // Do not clear route cache
                null  // No append action
        );
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



callouts/java/service-callout/src/main/java/example/BasicCalloutServer.java [57:103]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            return this;
        }
    }

    /**
     * Modifies the incoming request headers by adding specific key-value pairs.
     * <p>
     * This method appends two headers, "request-header" with the value "added-request" and "c" with "d",
     * while clearing the route cache to ensure the new route is calculated.
     *
     * @param processingResponseBuilder the builder used to construct the {@link ProcessingResponse}.
     * @param headers the {@link HttpHeaders} representing the original request headers.
     */
    @Override
    public void onRequestHeaders(ProcessingResponse.Builder processingResponseBuilder,
                                 HttpHeaders headers) {

        // Modify headers for the request
        addHeaderMutations(
                processingResponseBuilder.getRequestHeadersBuilder(),
                ImmutableMap.of("request-header", "added-request", "c", "d").entrySet(),  // Headers to add
                null,  // No headers to remove
                true,  // Clear route cache
                null   // No append action
        );
    }

    /**
     * Modifies the outgoing response headers by adding new headers and removing existing ones.
     * <p>
     * This method appends two headers, "response-header" with the value "added-response" and "c" with "d",
     * while removing the "foo" header. It does not clear the route cache.
     *
     * @param processingResponseBuilder the builder used to construct the {@link ProcessingResponse}.
     * @param headers the {@link HttpHeaders} representing the original response headers.
     */
    @Override
    public void onResponseHeaders(ProcessingResponse.Builder processingResponseBuilder,
                                  HttpHeaders headers) {
        // Modify headers for the response
        addHeaderMutations(
                processingResponseBuilder.getResponseHeadersBuilder(),
                ImmutableMap.of("response-header", "added-response", "c", "d").entrySet(),  // Headers to add
                ImmutableList.of("foo"),  // Headers to remove
                false,  // Do not clear route cache
                null  // No append action
        );
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



