python - Use slash commands to make rest calls in Slack -


so @ work team uses slack, , thought cool if slash command modify of our parse tables (we have lot of cloud code want turn off , on maintenance). supposedly can add get/post requests different slashes, don't see how can modify header. want run following rest call (this python version)

import json,httplib,urllib connection = httplib.httpsconnection('api.parse.com', 443) connection.connect() connection.request('post', '/1/functions/activatecloud', json.dumps({      }), {        "x-parse-application-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",        "x-parse-rest-api-key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",        "content-type": "application/json"      }) result = json.loads(connection.getresponse().read()) print result #don't need print anything, using testing 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -