UNPKG

ravendb

Version:
43 lines 1.05 kB
import { RavenCommand } from "../../Http/RavenCommand.js"; export class TcpConnectionInfo { url; certificate; urls; nodeTag; serverId; } export class GetTcpInfoCommand extends RavenCommand { _tag; _dbName; requestedNode; constructor(tag, dbName) { super(); this._tag = tag; this._dbName = dbName; this.timeout = 15_000; } createRequest(node) { let uri; if (!this._dbName) { uri = `${node.url}/info/tcp?tcp=${this._tag}`; } else { uri = `${node.url}/databases/${this._dbName}/info/tcp?tcp=${this._tag}`; } this.requestedNode = node; return { uri, method: "GET" }; } async setResponseAsync(bodyStream, fromCache) { if (!bodyStream) { this._throwInvalidResponse(); } return this._parseResponseDefaultAsync(bodyStream); } get isReadRequest() { return true; } } //# sourceMappingURL=GetTcpInfoCommand.js.map