import json,httplib

config_file = open('conf/net/ext_service/parse.json')

silent_push_msg = {
   "where": {
     "deviceType": "ios"
   },
   "data": {
     # "alert": "The Mets scored! The game is now tied 1-1.",
     "content-available": 1,
     "sound": "",
   }
}

parse_headers = {
   "X-Parse-Application-Id": config_file["emission_id"],
   "X-Parse-REST-API-Key": config_file["emission_key"],
   "Content-Type": "application/json"
}

connection = httplib.HTTPSConnection('api.parse.com', 443)
connection.connect()

connection.request('POST', '/1/push', json.dumps(silent_push_msg), parse_headers)

result = json.loads(connection.getresponse().read())
print result


import json,httplib

config_data = json.load(open('conf/net/ext_service/parse.json'))

silent_push_msg = {
   "where": {
     "deviceType": "ios"
   },
   "data": {
     # "alert": "The Mets scored! The game is now tied 1-1.",
     "content-available": 1,
     "sound": "",
   }
}

parse_headers = {
   "X-Parse-Application-Id": config_data["emission_id"],
   "X-Parse-REST-API-Key": config_data["emission_key"],
   "Content-Type": "application/json"
}

connection = httplib.HTTPSConnection('api.parse.com', 443)
connection.connect()

connection.request('POST', '/1/push', json.dumps(silent_push_msg), parse_headers)

result = json.loads(connection.getresponse().read())
print result


Fix minor issue in remote push
Fix minor issue in remote push

We need to open the file and then parse it as json
