Skip to content

Instantly share code, notes, and snippets.

@hidinginabunker
Created May 11, 2011 23:52
Show Gist options
  • Save hidinginabunker/967657 to your computer and use it in GitHub Desktop.
Save hidinginabunker/967657 to your computer and use it in GitHub Desktop.
Testing github post-receive hook
app = Flask(__name__)
@app.route("/", methods=['GET'])
def helloworld():
return "PostReceive Catch Active"
@app.route("/", methods=['POST'])
def hello():
payloadString = request.form['payload']
payload = json.loads(payloadString)
print json.dumps(payload, sort_keys=True, indent=4)
return "Payload Received"
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment