Jeremy Gallant
11 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
1 deletions
-
packages/transport-http/src/transport.ts
|
|
|
@ -12,7 +12,9 @@ export class TransportHTTP implements Types.Transport { |
|
|
|
tls?: boolean, |
|
|
|
): Promise<TransportHTTP> { |
|
|
|
const connectionUrl = `${tls ? "https" : "http"}://${address}`; |
|
|
|
await fetch(`${connectionUrl}/json/report`); |
|
|
|
await fetch(`${connectionUrl}/api/v1/toradio`, { |
|
|
|
method: "OPTIONS", |
|
|
|
}); |
|
|
|
await Promise.resolve(); |
|
|
|
return new TransportHTTP(connectionUrl); |
|
|
|
} |
|
|
|
|