Rename (Async)HttpRequestCustomizer to Mcp(Async)HttpRequestCustomizer, add delegating implementation#453
Closed
Kehrlann wants to merge 3 commits intomodelcontextprotocol:mainfrom
Conversation
Contributor
Author
|
Tagging @chemicL , to review |
chemicL
reviewed
Aug 6, 2025
| public Publisher<HttpRequest.Builder> customize(HttpRequest.Builder builder, String method, URI endpoint, | ||
| String body) { | ||
| var result = Mono.just(builder); | ||
| for (var customizer : this.customizers) { |
Member
There was a problem hiding this comment.
I can't think of a more efficient way to apply async folding of this. Using reduceWith operator would still have to accumulate using flatMap and would add another operator to the mix, so the loop is fine IMO.
tzolov
pushed a commit
that referenced
this pull request
Aug 28, 2025
…ge (#453) - Move Mcp(Async)HttpRequestCustomizer from client.transport to client.transport.customizer - Rename (Async)HttpRequestCustomizer to Mcp(Async)HttpRequestCustomizer - Add DelegatingMcpAsyncHttpRequestCustomizer and DelegatingMcpSyncHttpRequestCustomizer for composing multiple customizers - Update all references across transport classes and tests - Improve package organization and naming consistency with MCP prefix
Contributor
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
The name
(Async)HttpRequestCustomizeris too broad when used in a broader project. We prefix it withMcpto make it clearer in what context this should exist. Originally raised in: #388 (comment)Additionally, users may want to apply mutliple customizers. We provide a convenient "delegating" implementation, that goes through a list of customizers in order. Originally raised in: spring-projects/spring-ai#3994 (comment)
How Has This Been Tested?
n/a
Breaking Changes
Yes, renaming:
HttpRequestCustomizer->McpHttpRequestCustomizerAsyncHttpRequestCustomizer->McpAsyncHttpRequestCustomizerTypes of changes
Checklist