OxL Reference

method Server.scheme

http or https.

Example:

oxl✓ checked in CI
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() -> str

Since. 1.0.0-beta

Returns

str

Effects

none declared (pure unless the body says otherwise)

Defined in: std/http/http.oxl:4373

See also