I thought it would be easy to find an answer to this, but it wasn't. I'm trying to make an api call from a function and then display the response in a different function. What I've got or what I want to achieve:
async getData() {
const response = await http.get("/api/");
}
async showData() {
const result = await this.getData();
console.log(result);
}
Any help is appreciated!