title: Angular2 RxJS why doesn't map() work?
body: <p>Angular2 http requests return observables.  In the documentation for observables, you can use the function <code>.map()</code> on an observable. </p>
  
  <p>But when I use <code>.map()</code> on my http observable I get this error:  </p>
  
  <pre><code>argument is not a function. Are you looking for `mapTo()`?
  </code></pre>
  
  <p><code>.mapTo()</code> seems to provide somewhat similar behavior, but I'm wondering.... why doesn't <code>.map()</code> work here?</p>
  
  <p>EDIT:</p>
  
  <p>Thanks, here is a bit more information.  I am using webpack and Angular 2.0.0-beta.8.</p>
  
  <p>The abbreviated actual code looks like:</p>
  
  <pre><code>  import { Observable, map, concatMap, flatMap, reduce, subscribe } from 'rxjs';
  
    getRequest(endpoint) {
      return this.http.get('https://api.fitbit.com/1/user/-/' + endpoint,
        {
          headers: {
            Authorization: 'Bearer ' +
            localStorage.getItem(this.name + 'AccessToken'),
            'Content-Type': 'application/json'
          }
        }).map(response =&gt; response.json());
    }
  
    var profileRequest = this.getRequest('profile.json');
    var profileRequestLog = profileRequest.map('profile fetched');
  </code></pre>