title: How to handle/queue multiple same http requests with RxJs?
body: <p>I am making an Angular 4 app. Components are subscribing Observable. Sometimes Observable call the same url. For example 'refresh Access Token' if needed before any http request. But if I  make different 3 http requests, it will "refresh if needed" 3 times the refresh token.</p>
  
  <p>So how to make only one http get to get a refreshed access token, and make the other observables 'wait' for the first one ? (I know 'wait' is not the good word for Observables).</p>
  
  <pre><code>        public get(url: string, options?: RequestOptionsArgs): Observable&lt;Response&gt; {
              return this.getAccessToken().mergeMap(accessToken =&gt; {
                return this.http.get(url, options);
              });
            }
  </code></pre>
  
  <p>// And </p>
  
  <pre><code>this.get('www.myapi.com/one').subscribe(data=&gt;console.log('one',data))
  this.get('www.myapi.com/two').subscribe(data=&gt;console.log('two',data))
  this.get('www.myapi.com/three').subscribe(data=&gt;console.log('three,data))
  </code></pre>