getRelayInfo method
network request to get the RelayInfo of the relay at url;
returns null when it is unavailable
Implementation
@override
Future<RelayInfo?> getRelayInfo(String url) async {
try {
final json = await httpDS.jsonRequest(
url,
timeout: timeout,
headers: const {'Accept': 'application/nostr+json'},
);
return RelayInfo.fromJson(
json,
Uri.parse(url).replace(scheme: 'https').toString(),
);
} catch (e) {
Logger.log.d(() => e);
return null;
}
}