UNPKG

@mindconnect/mindconnect-nodejs

Version:

NodeJS Library for Siemens Insights Hub Connectivity - TypeScript SDK for Insights Hub and Industrial IoT - Command Line Interface - Insights Hub Development Proxy (Siemens Insights Hub was formerly known as MindSphere)

26 lines 955 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.putFileTemplate = exports.dataExchangeTemplate = void 0; const dataExchangeTemplate = (metadata, buffer) => ` ----mindsphere\r\n\ Content-Disposition: form-data; name="file"; filename="${metadata.name}"\ \r\n\ Content-Type: ${metadata.type || "application/octet-stream"}\ \r\n\r\n${buffer.toString("ascii")}\r\n\ ----mindsphere\r\n\ Content-Disposition: form-data; name="metadata"\ \r\n\ Content-Type: application/json\ \r\n\r\n\ ${JSON.stringify(metadata, null, 2)}\r\n\ \r\n----mindsphere--`; exports.dataExchangeTemplate = dataExchangeTemplate; const putFileTemplate = (buffer) => ` ----mindsphere\r\n\ Content-Disposition: form-data; name="file"; filename="replacementFile"\ \r\n\ Content-Type: some/content\ \r\n\r\n${buffer.toString("ascii")}\r\n\ \r\n----mindsphere--`; exports.putFileTemplate = putFileTemplate; //# sourceMappingURL=data-exchange-template.js.map