@coolio/http
Version:
HTTP networking client
15 lines • 664 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.processMultipartBody = function (body, boundary) {
body.split(boundary);
throw new Error('Multipart response parsing is not implemented yet.');
};
exports.getBoundaryFromContentTypeHeader = function (header) {
var _a;
var boundary = (_a = header.find(function (element) { return element.startsWith('boundary='); })) === null || _a === void 0 ? void 0 : _a.replace('boundary=', '');
if (!boundary) {
throw new Error('Could not find multipart boundary in Content-Type header.');
}
return boundary;
};
//# sourceMappingURL=multipart.helper.js.map