Fix operation with external artifact creation 22/116122/2
authorandre.schmid <andre.schmid@est.tech>
Thu, 3 Dec 2020 15:45:04 +0000 (15:45 +0000)
committerChristophe Closset <christophe.closset@intl.att.com>
Mon, 7 Dec 2020 09:09:32 +0000 (09:09 +0000)
Change-Id: I728534bbc0e1c29800ae57300aa3c6a4710ac887
Issue-ID: SDC-3396
Signed-off-by: andre.schmid <andre.schmid@est.tech>
catalog-ui/src/app/ng2/services/component-services/component.service.ts

index 760bfc5..3093e63 100644 (file)
@@ -223,11 +223,11 @@ export class ComponentServiceNg2 {
             payloadData: oldOperation.artifactData
         };
 
-        const headers = new HttpHeaders();
+
         JSON.stringify(payload);
         const payloadString = JSON.stringify(payload, null, '  ');
         const md5Result = md5(payloadString).toLowerCase();
-        headers.append('Content-MD5', btoa(md5Result));
+        const headers = new HttpHeaders().append('Content-MD5', btoa(md5Result));
 
         return this.http.post(this.baseUrl + component.getTypeUrl() + component.uuid + '/interfaces/' + newOperation.interfaceId + '/operations/' + newOperation.uniqueId + '/artifacts/' + newOperation.implementation.artifactUUID,
                 payload, {headers}