I have an API. If you open that you should enter username and password. How can I get the data which is in that API? If I write get("....api-url...."), it shows unauthorized error. How can I pass a username and password to that API?
constructor(private _http: Http) {
this.getMyBlog();
}
private getMyBlog() {
return this._http.get('http://localhost:8088/.../...')
.map((res: Response) => res.json())
.subscribe(data => {
this.data = data;
console.log(this.data);
});
}