UNPKG

@configurator/ravendb

Version:
32 lines 957 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StreamCommand = void 0; const RavenCommand_1 = require("../../Http/RavenCommand"); const Exceptions_1 = require("../../Exceptions"); class StreamCommand extends RavenCommand_1.RavenCommand { constructor(url) { super(); if (!url) { (0, Exceptions_1.throwError)("InvalidArgumentException", "Url cannot be null."); } this._url = url; this._responseType = "Empty"; } createRequest(node) { return { uri: `${node.url}/databases/${node.database}/${this._url}` }; } async processResponse(cache, response, bodyStream, url) { this.result = { response, stream: bodyStream }; return "Manually"; } get isReadRequest() { return true; } } exports.StreamCommand = StreamCommand; //# sourceMappingURL=StreamCommand.js.map