Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229676

Adding "Authorization" header in get request

$
0
0

I trying

  let headers = new Headers({ 'Authorization': 'Bearer ' + window.localStorage.getItem('token') });
    let options = new RequestOptions({ headers: headers });
    return this.http.get(this.api+'causes' , options).map( res => res.json());

but return to me the following error
ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays. ??
Any idea ?


Viewing all articles
Browse latest Browse all 229676

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>