Node constructor
Implementation
Node(
Protocol protocol,
String host, {
int? port,
String path = '',
this.client,
}) {
if (host.isEmpty) {
throw MissingConfiguration('Ensure that Node.host is not empty');
}
if (port == null) {
switch (protocol) {
case Protocol.https:
port = 443;
break;
case Protocol.http:
port = 80;
break;
}
}
uri = Uri(
scheme: protocol.value(),
host: host,
port: port,
path: path,
);
}