Advertisement
Guest User

Untitled

a guest
Dec 12th, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import json
  2. import urllib.request
  3. email = input("Почту введи\n")
  4. val = json.dumps({'email':email})
  5. url = 'http://mom-kebab.herokuapp.com/slack/invite'
  6. reg = urllib.request.Request(url, method='POST')
  7. reg.add_header('Content-Type', 'application/json')
  8. reg.data = val.encode('utf8')
  9.  
  10. try:
  11. response = urllib.request.urlopen(reg)
  12. except Exception as error:
  13. print(error)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement