title: 'ReferenceError: httpResponse is not defined' When parsing JSON response of Parse httpRequest
body: <p>My promise statement pings eBay multiple times, each time with the properties of a <code>matchCenterItem</code> as the parameters. When it has run through all the instances, I want it to then send all the responses over to my iOS app.</p>
  
  <p>My attempt to do this in <code>response.success</code> results in an error stating <code>httpResponse is not defined</code>, even though I do define it beforehand. </p>
  
  <pre><code>Parse.Cloud.define("MatchCenterTest", function(request, response) {
      //defines which parse class to iterate through
      var matchCenterItem = Parse.Object.extend("matchCenterItem");
      var query = new Parse.Query(matchCenterItem);
      var promises = [];
      //setting the limit of items at 10 for now
      query.limit(10);
      query.find().then(function(results) {
          for (i=0; i&lt;results.length; i++) {
              url = 'http://svcs.ebay.com/services/search/FindingService/v1';
              //push function containing criteria for every matchCenterItem into promises array
                promises.push(function() {
                  return Parse.Cloud.httpRequest({
                    url: url,
                    params: {
                        'OPERATION-NAME' : 'findItemsByKeywords',
                        'SERVICE-VERSION' : '1.12.0',
                        'SECURITY-APPNAME' : '*APP ID GOES HERE*',
                        'GLOBAL-ID' : 'EBAY-US',
                        'RESPONSE-DATA-FORMAT' : 'JSON',
                        'REST-PAYLOAD&amp;sortOrder' : 'BestMatch',
                        'paginationInput.entriesPerPage' : '3',
                        'outputSelector=AspectHistogram&amp;itemFilter(0).name=Condition&amp;itemFilter(0).value(0)' : results[i].get('itemCondition'),
                        'itemFilter(1).name=MaxPrice&amp;itemFilter(1).value' : results[i].get('maxPrice'),
                        'itemFilter(1).paramName=Currency&amp;itemFilter(1).paramValue' : 'USD',
                        'itemFilter(2).name=MinPrice&amp;itemFilter(2).value' : results[i].get('minPrice'),
                        'itemFilter(2).paramName=Currency&amp;itemFilter(2).paramValue' : 'USD',
                        //'itemFilter(3).name=LocatedIn&amp;itemFilter(3).Value' : request.params.itemLocation,
                        'itemFilter(3).name=ListingType&amp;itemFilter(3).value' : 'FixedPrice',
                        'keywords' : results[i].get('searchTerm'),
                    }
                  });
                });
          }
          Parse.Promise.when(promises).then(function() {
            var eBayResults = JSON.parse(httpResponse.text);
            for (i=0; i&lt;eBayResults.length; i++)
            {
              console.log(eBayResults[i]); // So you can see what the response 
                                       // looks like for each httpRequest that was made
            }
            // and by the way if this is the end of your function, then here you can call
            response.success(eBayResults);
          }, function(err) {
                    console.log('error!');
                    response.error();
             });
      });
  });
  </code></pre>