Created
February 15, 2020 11:34
-
-
Save goescat/0281fb93e002738e84c05137b48750a5 to your computer and use it in GitHub Desktop.
Very simple Mattermost outgoing webhook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from flask import Flask, request | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| return 'Home Page' | |
| @app.route('/mattermost', methods = ['GET', 'POST']) | |
| def post(): | |
| if request.method == 'POST': | |
| request_data = request.get_data() | |
| return request_data | |
| if request.method == 'GET': | |
| return "get" | |
| if __name__ == "__main__": | |
| app.run(host='0.0.0.0', port=8888) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment