Skip to content

Instantly share code, notes, and snippets.

@goescat
Created February 15, 2020 11:34
Show Gist options
  • Select an option

  • Save goescat/0281fb93e002738e84c05137b48750a5 to your computer and use it in GitHub Desktop.

Select an option

Save goescat/0281fb93e002738e84c05137b48750a5 to your computer and use it in GitHub Desktop.
Very simple Mattermost outgoing webhook
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