Hi everyone, I’m new here and I can not connect my app with local api using basic authentication by postman, that’s my code `import { Http } from ‘@angular/http’;
import { Injectable } from ‘@angular/core’;
import ‘rxjs/add/operator/map’;
import ‘rxjs/add/observable/of’;
import { Headers } from ‘@angular/http’;
@Injectable()
export class ApiProvider {
private baseapiPath = "http://localhost:8080/datasnap/rest"
constructor(public http: Http) {
}
getItens() {
let login = “teste”;
let password = “123”;
let headers = new Headers({ 'Content-Type':'*/*' });
headers.append('Authorization', 'Basic' + (login + ':' + password) );
return this.http.get(this.baseapiPath + "/titensserver/itens", { headers: headers })
}
} `