1async _getProtectedQuote() {
2 var DEMO_TOKEN = await AsyncStorage.getItem(STORAGE_KEY);
3 fetch("http://localhost:3001/api/protected/random-quote", {
4 method: "GET",
5 headers: {
6 'Authorization': 'Bearer ' + DEMO_TOKEN
7 }
8 })
9 .then((response) => response.text())
10 .then((quote) => {
11 AlertIOS.alert(
12 "Chuck Norris Quote:", quote)
13 })
14 .done();
15},