Skip to content

Instantly share code, notes, and snippets.

@hatimn02
Created July 26, 2016 07:55
Show Gist options
  • Save hatimn02/5eee18eb1167ce6a58f5ce22f4203d9c to your computer and use it in GitHub Desktop.
Save hatimn02/5eee18eb1167ce6a58f5ce22f4203d9c to your computer and use it in GitHub Desktop.
Python sample code
from urllib import urlencode
from urllib2 import Request, urlopen
authkey = 'YOUR_AUTHKEY' # Set your Auth-Key here
url = 'http://flow.viasocket.com/trigger/sample_url/slack_integration' # Set your socket URL here
post_fields = {'foo': 'bar'} # Set POST fields here
request = Request(url, urlencode(post_fields).encode())
request.add_header('Auth-Key', authkey)
json = urlopen(request).read().decode()
print(json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment