From f27d5549734324727a5432f6ff663b0880425f47 Mon Sep 17 00:00:00 2001 From: sj108s Date: Mon, 2 Apr 2018 14:46:25 +0530 Subject: Corrected artifact name for multiple template ids Made changes in param name value component ts for setting correct artifact name while saving and retrieving artifacts, in case of multiple template ids. Issue-ID: APPC-812 Change-Id: I973f7b763f4c2204425fceb77cdae33944ba3c8d Signed-off-by: sj108s --- src/app/shared/services/httpUtil/http-util.service.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/app/shared') diff --git a/src/app/shared/services/httpUtil/http-util.service.ts b/src/app/shared/services/httpUtil/http-util.service.ts index 35c5047..33b3c9e 100644 --- a/src/app/shared/services/httpUtil/http-util.service.ts +++ b/src/app/shared/services/httpUtil/http-util.service.ts @@ -16,8 +16,6 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -ECOMP is a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END============================================ */ import { observable } from 'rxjs/symbol/observable'; @@ -30,13 +28,14 @@ import { Http, Response, Headers, RequestOptions } from '@angular/http'; export class HttpUtilService { headers: Headers; options: RequestOptions - constructor (private http: Http) { + private username = require('../../../cdt.application.properties.json').username; + private password = require('../../../cdt.application.properties.json').password; + constructor(private http: Http) { this.headers = new Headers({ 'Content-Type': 'application/json' }); // ... Set content type to JSON // this.options = new RequestOptions({headers: this.headers}); // } get(req) { - return this .http .get(req.url, this.options) @@ -44,10 +43,8 @@ export class HttpUtilService { } post(req) { - - this.headers.append('Authorization', 'Basic ' + btoa('m97292@appc.att.com:enc:Ai8KDxN7EANwATsV')); + this.headers.append('Authorization', 'Basic ' + btoa(this.username + ':' + this.password)); this.options = new RequestOptions({ headers: this.headers }); - return this .http .post(req.url, req.data, this.options) -- cgit 1.2.3-korg