Is it possible use "await" with Observables?

is it possible to use “await” with Observables?

I have to call a web service and when the server sends a response I have to execute other actions.

I’m using HttpClient (get and post) that returns an Observable when used.

Is this correct?

const response = await
<other actions after response has been received>

Thank you


Use toPromise to convert an observable to a promise

1 Like

Something like this?

await this.httpclient

I’ll try. Thank you.


Yes, that’s correct.