title: Make observable call synchronous in angular 9
body: <p>I am using observable for HTTP request I want to make it as a synchronous call since am new to rxjs. And below code am using to doing the multiple calls, so after the completion of all the calls only I have to call the drive method. I referred a lot of links but I could not understand pls help me.</p>
  <p>ServicecallApi:</p>
  <pre><code>public createHttpRequests(
      method: string,
      url: string,
      payload?: any,
      params?: any,
   
    ): Observable&lt;any&gt; {
      switch ((method).toLowerCase()) {
        case 'get': return this.createHttpGet(url, params);
        case 'post': return this.createHttpPost(url, payload);
        default: return this.http.get('');
      }
    }
  </code></pre>
  <p>And my service call is below:</p>
  <pre><code>  public ngOnInit(): void {
  
  
  this.serviceCall.createHttpRequests('get', this.someService.getUserList, {}, {}).pipe(
    map((result: Iuserlist) =&gt; {
      if (result.body.statusCode ===  200) {
      
      } else {
     
      }
    }),
  ).subscribe();
  this.serviceCall.createHttpRequests('get', this.someService.getsomeData, {}, {}).pipe(
    map((result: Isomedatas) =&gt; {
      if (result.body.statusCode ===  200) {
      
      } else {
     
      }
    }),
  ).subscribe();
  
  //This method should call after the above api completion 
  this.getDriverDetails();
   }
  </code></pre>