instapush/libs/gcm.py
def _send(self, data, content_type):
        """
        Sends a GCM message with the given content type
        """

        headers = {
            "Content-Type": content_type,
            "Authorization": "key=%s" % (self.api_key),
            "Content-Length": str(len(data))
        }

        request = Request(self.api_url, data, headers)
        return urlopen(request).read().decode(self.encoding)
def _send(self, data, content_type):
        headers = {
            "Content-Type": content_type,
            "Authorization": "key=%s" % (self.api_key),
            "Content-Length": str(len(data))
        }

        request = Request(self.api_url, data, headers)
        return urlopen(request).read().decode(self.encoding)
def _send ( self , data , content_type ) : headers = { "Content-Type" : content_type , "Authorization" : "key=%s" % ( self . api_key ) , "Content-Length" : str ( len ( data ) ) } request = Request ( self . api_url , data , headers ) return urlopen ( request ) . read ( ) . decode ( self . encoding )
Sends a GCM message with the given content type
Sends a GCM message with the given content type