Http Request in ionic with Headers


This is my code

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;

import { Http, Response,Headers,RequestOptions} from ‘@angular/http’;
import ‘rxjs/add/operator/map’;

selector: ‘page-home’,
templateUrl: ‘home.html’
export class HomePage {

constructor(public navCtrl: NavController, public http:Http) {
var headers=new Headers();
headers.append(‘Authorization’,‘Basic c2FuY2hpdGFAaXNpc2Rzbi5uZXQ6MTIz’);

  this.http.get('',{"headers": headers}).subscribe(data=>{



please help me as much as possible .

Headers is not added at request time


Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.