title: Error retrieving jsonp from aurelia http client
body: <p>I have an application I am creating using Aurelia.  I wish to retrieve the latest images from a user in instagram via ajax.  I tried using the <a href="https://github.com/aurelia/http-client" rel="nofollow">Aurelia http client</a> because that's what the Flickr example on Aurelia's getting started page uses.</p>
  
  <p>If I use <code>http.get</code>, then I get a CORS error from instagram.  Trying <code>http.jsonp</code>, the inspected response shows the <a href="https://instagram.com/developer/endpoints/" rel="nofollow">correct format</a>, but I get what looks like a parsing error (Unexpected token ":") before the callback that handles the response is being executed.</p>
  
  <p>I <em>am</em> able to successfully retrieve the images via AJAX using jQuery, but I am curious to know what I am doing wrong with the Aurelia http client.</p>
  
  <p>Here are the relevant bits of the view model:</p>
  
  <pre><code>import {inject} from 'aurelia-framework';
  import {HttpClient} from 'aurelia-http-client';
  
  @inject(HttpClient)
  export class Welcome {
    images = [];
    url = '[INSTAGRAM_URL]';
  
    constructor(http){
      this.http = http;
    }
  
    activate(){
      return this.http.jsonp(this.url).then(response =&gt; {
        this.images = response.data.map(function (d) {
              return {
                  src: d.images.standard_resolution.url,
                  caption: d.caption.text,
                  when: d.created_time
              };
          });
      });
    }
  }
  </code></pre>