Proceed only after http request finish

Hi all, my page will need to fetch data from remote server using REST services then based on the data to initialise my page. how do i make it to proceed following line only after data all arrived from server? thanks

I don’t think this is a good way to think about things in asynchronous networked applications. Instead be reactive:

this.foo = "sensible default";

http.get(url).subscribe((rsp) => {
  // only in here can you rely on the response
  this.foo = rsp.json();
});