title: Meteor: how use data from an Http call in templates
body: <p>I make a call in Http main.js and this returns me to my console "Uncaught TypeError: Can not read property 'set' of null"
  Can not retrieve information from my http call outside the function itself.
  Thanks for you help.</p>
  
  <pre><code>Template.prod.onCreated(function prodOnCreated() {
  var tmpl = this;
  tmpl.data = new ReactiveVar;
  
  HTTP.call( 'GET', 'https://localhost:9002/rest/v2/electronics/products/search/?query=:price-asc:category:575', {}, function( error, response ) {
  if ( error )
  console.log( error );
   else {
  console.log( response.data.products[0].code); // that works: display  "2140285"
  tmpl.data.set(response.data);// Doesn't work: message in the console "Uncaught TypeError: Cannot read property 'set' of null"
  }
  });
  });
  
  
  Template.prod.helpers({
  data: function() {
  console.log('Hi you are in the data function');
  return  Template.instance().data.get();
  }
  });
  </code></pre>
  
  <p><strong>The console display:</strong></p>
  
  <blockquote>
    <p>main.js:40 Uncaught TypeError: Cannot read property 'set' of
    null(anonymous function) @ main.js:40(anonymous function) @
    httpcall_client.js:83(anonymous function) @
    underscore.js?hash=8de51f9…:784xhr.onreadystatechange @
    httpcall_client.js:172</p>
  </blockquote>