-
Notifications
You must be signed in to change notification settings - Fork 299
Include reqwest in transport-streamble-http-client feature #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
How about moving this block to The "this block" I say means the convertion from impl From<reqwest::Error> for StreamableHttpError<reqwest::Error> {
fn from(e: reqwest::Error) -> Self {
StreamableHttpError::Client(e)
}
} This will allow user to choose the client. |
- Fix compilation error when using transport-streamable-http-client feature due to missing dependency - Move From<reqwest::Error> implementation to reqwest module
Good catch, updated. |
I mean the latter. I have to admit that it could be confusing for user, so maybe we should add some guide, maybe in the document of |
- Added `transport-sse-client-reqwest` and `transport-streamable-http-client-reqwest` features for reqwest-based implementations. - Updated documentation to reflect new client-agnostic transport capabilities. - Modified error handling in SSE transport to use `String` for content type. - Updated dependencies to include new features in examples.
@4t145 Ok, I've made the transports client-agnostic by:
As you'll see I had to fix the same issue for SSE client since it was also forcing reqwest dependencies. Let me know if this what you what you had in mind. |
Closes #349
Motivation and Context
The
transport-streamable-http-client
feature makes use of the reqwest crate, but does not declare it as a component feature in the rmcp Cargo.toml. This prevents a project with rmcp from being compiled if they make use of the feature.How Has This Been Tested?
I've managed to now compile my application using
transport-streamable-http-client
.Breaking Changes
No
Types of changes
Checklist
Additional context