title: iron-ajax with basic auth not working
body: <p>I'm trying to make a request from my polymer frontend to my java-jersey backend using iron-ajax, but can't seem to work out a way to do basic auth without hardcoding it as an attribute. I don't know where to write the header-making method so that it gets used by the iron-ajax. I tried putting it both inside and outside Polymer({}) and still it doesn't get called. Here's my code. Please help. Thanks.</p>
  
  <pre><code>    &lt;link rel="import" href="../bower_components/polymer/polymer.html"&gt;
      &lt;link rel="import" href="../bower_components/iron-ajax/iron-ajax.html"&gt;
  
      &lt;dom-module id="activity-feed"&gt;
          &lt;style is="custom-style" include="iron-flex iron-flex-alignment"&gt;
              .cont{ height:90vh; overflow: auto;}
      core-list .row{height: 80px;padding: 16px}
          &lt;/style&gt;
          &lt;template&gt;
          &lt;div class="cont"&gt;
              &lt;iron-ajax
              auto
              url="http://localhost:8080/tip/webapi/home"
              handle-as="json"
              method="GET"
              headers='{"Authorization": {{makeheaders(gi,tanu)}}}'
              last-response="{{gogo}}"
              &gt;&lt;/iron-ajax&gt;
              &lt;div&gt;{{gogo.id}}&lt;/div&gt;              
              &lt;/div&gt;
          &lt;/template&gt;
      &lt;/dom-module&gt;
      &lt;script&gt;
          Polymer({
              is : "activity-feed",
              makeheaders: function(user,pass){
                  console.log('ceva tot se intampla');
              },
          });
          function makeheaders(user, pass) {
              console.log('merge functia');
              return "Basic " + btoa(user + ":" + pass);
          }
      &lt;/script&gt;
  </code></pre>