ravendb
Version:
RavenDB client for Node.js
29 lines • 799 B
JavaScript
import { RavenCommand } from "../../Http/RavenCommand.js";
import { throwError } from "../../Exceptions/index.js";
export class StreamCommand extends RavenCommand {
_url;
constructor(url) {
super();
if (!url) {
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;
}
}
//# sourceMappingURL=StreamCommand.js.map