-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I'm trying to use Twitch CLI and utilize its websocket mock server.
The websocket server is hosted on ws://127.0.0.1:8080/ws
And I need to send subscriptions to http://127.0.0.1:8080/eventsub/subscriptions
Thanks to this example I can specify websocket url:
let (socket, _) = tokio_tungstenite::connect_async_with_config(
twitch_api::TWITCH_EVENTSUB_WEBSOCKET_URL.clone().as_str(),
Some(config),
false,
)but there're no way to specify url for HelixClient (to call create_eventsub_subscription)
fn get_uri(&self) -> Result<http::Uri, InvalidUri> {
let query = self.query()?;
let url = crate::TWITCH_HELIX_URL
.join(<Self as Request>::PATH)
.map(|mut u| {
u.set_query(Some(&query));
u
})?;
http::Uri::from_str(url.as_str()).map_err(Into::into)
}If I set TWITCH_HELIX_URL and TWITCH_EVENTSUB_WEBSOCKET_URL in .env, I can't use HelixClient for production request like getting channel info etc. So, I think there's only a workaround to use custom client to send subscription requests, but I would have it in your crate like HelixClient::with_config(...)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request