title: Angular2 watch for 302 redirect when fetching resource
body: <p>I have a requirement to pull a few resources from another domain held by my company. I want to pull secured HTML content with GET requests.</p>
  
  <p>When a user is signed out of the application the requested content will return a 302 to the login page.</p>
  
  <p>My attempts to sniff the headers for a 302 haven't returned what I'd hoped for so far. The response returned by my Observable is a 200 (login page).</p>
  
  <p>Here is my sample app.</p>
  
  <pre><code>export class MenuComponent implements OnInit {
  
      private _resourceUrl = "http://localhost:3001/resources/menu";
  
      constructor(private _http: Http){
      }
  
      menu: string;
  
      ngOnInit(): void {
          this.getMenu()
              .subscribe(
                  response =&gt; {
                      console.log(`Response status: ${response.status}`);
  
                      this.menu = response.text();
                  },
                  error =&gt; console.log(&lt;any&gt;error));
      }
  
      getMenu(): Observable&lt;Response&gt;{        
          return this._http.get(this._resourceUrl)
              .map((response: Response) =&gt; response)
              .catch(this.handleError);
      }
  
      private handleError(error: Response){
          console.log(error);
          return Observable.throw(error.json().error || 'Server Error');
      }
  }
  </code></pre>
  
  <p>Am I even on the right track?</p>