Skip to content

How to use SlackClientHttpConnector for SlackClient? #166

Answered by abdolence
Otter-0x4ka5h asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

SlackClientHttpConnector is designed to be able to implement different HTTP connectors and use different async runtimes. I know people were interested to have/implement async-std themselves for example.

Saying that this crate provides only default implementation for Hyper/Tokio (so I don't support two runtimes myself in the crate itself), so if you're not going to implement HTTP backend/provider for your specific needs you just need to enable the one that crate provides just enabling the feature in your deps:

slack-morphism = { version = "1.4", features = ["hyper"] }

and using it like this:

let client = SlackClient::new( SlackClientHyperConnector::new() );

As described in the docs:
h…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Otter-0x4ka5h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants