@fdm-monster/server
Version:
FDM Monster is a bulk OctoPrint, Klipper, PrusaLink and BambuLab manager to set up, configure and monitor 3D printers. Our aim is to provide neat overview over your farm.
18 lines (17 loc) • 725 B
JavaScript
import { apiKeyHeaderKey } from "../constants/octoprint-service.constants.js";
import { DefaultHttpClientBuilder } from "../../../shared/default-http-client.builder.js";
//#region src/services/octoprint/utils/octoprint-http-client.builder.ts
var OctoprintHttpClientBuilder = class extends DefaultHttpClientBuilder {
build() {
if (!this.axiosOptions.baseURL) throw new Error("Base URL is required");
return super.build();
}
withXApiKeyHeader(apiKey) {
if (!apiKey?.length) throw new Error("XApiKey header may not be an empty string");
this.withHeaders({ [apiKeyHeaderKey]: apiKey });
return this;
}
};
//#endregion
export { OctoprintHttpClientBuilder };
//# sourceMappingURL=octoprint-http-client.builder.js.map