method Server.scheme
http or https.
Example:
use std.http { Server, ServerConfig }
fn main() io, net {
match Server.bind(ServerConfig{ port: 0 }) {
Server s => {
print(s.scheme())
s.close()
}
NetError _ => print("cannot bind")
}
}Output
http
pub(api) fn scheme() -> strSince. 1.0.0-beta
Returns
str
Effects
none declared (pure unless the body says otherwise)
Defined in: std/http/http.oxl:4373