Commit df2e1343 authored by prumde's avatar prumde

Updated ecm-checkout.service.ts


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174520 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6eed161d
...@@ -4,10 +4,11 @@ import { Observable } from 'rxjs/Observable'; ...@@ -4,10 +4,11 @@ import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map'; import 'rxjs/add/operator/map';
import {Store} from '@ngrx/store'; import {Store} from '@ngrx/store';
import { HostUrlService } from '../../host-url.service';
@Injectable() @Injectable()
export class EcmCheckoutService { export class EcmCheckoutService {
constructor (private http: Http ) {} constructor (private http: Http,public hostUrlService : HostUrlService ) {}
sendData(data, _tokenid: string): Observable<any> { sendData(data, _tokenid: string): Observable<any> {
console.log( "inside send data" + JSON.stringify(data)); console.log( "inside send data" + JSON.stringify(data));
...@@ -17,7 +18,7 @@ export class EcmCheckoutService { ...@@ -17,7 +18,7 @@ export class EcmCheckoutService {
console.log( "sendLogin 1...." + _urlParams.toString() ); console.log( "sendLogin 1...." + _urlParams.toString() );
let headers = new Headers({ 'Content-Type': 'application/json' }); let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers }); let options = new RequestOptions({ headers: headers });
authUrl = authUrl + '?' + _urlParams.toString(); authUrl = this.hostUrlService.hostUrl + authUrl + '?' + _urlParams.toString();
console.log( "sendLogin 2...." + authUrl); console.log( "sendLogin 2...." + authUrl);
return this.http.post( authUrl, JSON.stringify(data) , options) return this.http.post( authUrl, JSON.stringify(data) , options)
.map( (res) => this.extractData(res) ); .map( (res) => this.extractData(res) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment