Skip to content

Conversation

@keelerm84
Copy link
Member

This first commit removes hyper as a direct dependency from this crate. Instead, we expose more generic types which we will implement in a subsequent PR.

As this isn't feature complete, I am merging this into a feature branch.

@keelerm84 keelerm84 requested a review from a team as a code owner January 6, 2026 15:45

// Simple reqwest-based transport implementation
#[derive(Clone)]
struct ReqwestTransport {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporary until we implement the hyper based version. But it keeps the tests passing without adding new dependencies.

@@ -1,54 +0,0 @@
use futures::{Stream, TryStreamExt};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will restore this in a subsequent commit.

url: Uri,
headers: HeaderMap,
reconnect_opts: ReconnectOptions,
connect_timeout: Option<Duration>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are features of the hyper transport, not part of the core library per se. So these will be brought back in the next PR as part of the hyper transport builder.

Happy to discuss alternatives if you would prefer, but this felt cleaner.

/// let client = ClientBuilder::for_url("https://example.com/events")?
/// .build_with_transport(transport);
/// ```
pub fn build_with_transport<T>(self, transport: T) -> impl Client
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these build methods are really to allow us to get at hyper's internals. We move them to that transport builder, and instead keep this interface simple.

* **Redirect following** - Automatic handling of HTTP redirects
* **Last-Event-ID** - Resume streams from last received event

## Migration from v0.16
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I change this later from migration guide to just examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants