@coolio/http
Version:
HTTP networking client
13 lines • 567 B
JavaScript
export const processMultipartBody = (body, boundary) => {
body.split(boundary);
throw new Error('Multipart response parsing is not implemented yet.');
};
export const getBoundaryFromContentTypeHeader = (header) => {
var _a;
const boundary = (_a = header.find(element => 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