Change HTTP transport intial connect attempt target (#729)
Co-authored-by: philon- <philon-@users.noreply.github.com>
This commit is contained in:
co-authored by
philon-
parent
afb7f4bd2e
commit
2e4d306d79
@@ -12,7 +12,9 @@ export class TransportHTTP implements Types.Transport {
|
|||||||
tls?: boolean,
|
tls?: boolean,
|
||||||
): Promise<TransportHTTP> {
|
): Promise<TransportHTTP> {
|
||||||
const connectionUrl = `${tls ? "https" : "http"}://${address}`;
|
const connectionUrl = `${tls ? "https" : "http"}://${address}`;
|
||||||
await fetch(`${connectionUrl}/json/report`);
|
await fetch(`${connectionUrl}/api/v1/toradio`, {
|
||||||
|
method: "OPTIONS",
|
||||||
|
});
|
||||||
await Promise.resolve();
|
await Promise.resolve();
|
||||||
return new TransportHTTP(connectionUrl);
|
return new TransportHTTP(connectionUrl);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user