I've asked on Stack Overflow but no answers yet.  I am trying to pass 
Parse.com headers to in an AngularJS $resource but console keeps giving me 
a 401(unauthorized).  I've double checked my Application ID and RESTApi ID 
and everything is correct.  My Javascript/Angular chops are not quite ninja 
yet, so its a bit harder for me to completely debug this thing; any help / 
suggestions would be awesome.  Here is my code:

var traffic = angular.module('traffic', [])
    .factory('TrafficService', function ($resource, PARSE_CREDENTIALS) {
        return $resource('https://api.parse.com/1/classes/traffic', {}, {
            headers: {
                'X-Parse-Application-Id': PARSE_CREDENTIALS.APP_ID,
                'X-Parse-REST-API-Key': PARSE_CREDENTIALS.REST_API_KEY
            }
        });
    })

    .value('PARSE_CREDENTIALS', {
        APP_ID: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        REST_API_KEY: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    });

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to