Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.43 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2.             post_data = {
  3.                 'msg': urllib.urlencode(data),
  4.                 'to': notifo_user
  5.             }
  6.            
  7.             post_data = urllib.urlencode(post_data)
  8.             req = urllib2.Request('https://api.notifo.com/v1/send_notification')
  9.             base64string = base64.encodestring('%s:%s' % (notifo_user, notifo_key)).replace('\n', '')
  10.             req.add_header("Authorization", "Basic %s" % base64string)