feat(ssl): redesign SSL usage
BREAKING CHANGE: Server::https was changed to allow any implementation of Ssl. Server in general was also changed. HttpConnector no longer uses SSL; using HttpsConnector instead.
This commit is contained in:
@@ -41,7 +41,7 @@ fn echo(mut req: Request, mut res: Response) {
|
||||
|
||||
fn main() {
|
||||
env_logger::init().unwrap();
|
||||
let server = Server::http(echo);
|
||||
let _guard = server.listen("127.0.0.1:1337").unwrap();
|
||||
let server = Server::http("127.0.0.1:1337").unwrap();
|
||||
let _guard = server.handle(echo);
|
||||
println!("Listening on http://127.0.0.1:1337");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user