Question: From a service constructor, I want to call 2 HttpClient.get asynchronously.
When the constructor is completed, the 2 get requests have to be already completed. 

```html
public async ReadConfiguration () 
  {
      await this.http.get ('http://localhost:80/api/Target.xml',{ responseType: 'text' })
        .toPromise()
        .then(res => console.log(res))
        .catch(err => { console.log ('error');
        });

      console.log ('line 25');

      await this.http.get ('http://localhost:80/api/Target.xml',{ responseType: 'text' })
        .toPromise()
        .then(res => console.log(res))
        .catch(err => { console.log ('error');
        });

      console.log ('line 32');
  }

  /*************************************************************************************/
  constructor(private http: HttpClient) {
    console.log ('-->constructor');
    this.ReadConfiguration ();
    console.log ('Done');
    console.log ('<--constructor');

  }
```

On the console I got:

```
-->constructor <br/>
Done <br/>
<--constructor <br/>

```

and only then (after few constructors are executed) I got the data. 

Can you please tell what is wrong in my code ?

Thank you in advance,
Zvika

Answer: 
Yes, code is working fine.

Because your method `this.ReadConfiguration();` is asynchronous in nature, and it will run out of the normal flow and execute after some time which is working as expected.
You need to put an await in this line:

```
this.ReadConfiguration ();

```

Like this:

```
constructor(private http: HttpClient) {
   console.log ('-->constructor');
   await this.ReadConfiguration ();
   console.log ('Done');
   console.log ('<--constructor');
}

```