Verified Commit 616cfabb authored by Sofus Rose's avatar Sofus Rose

Alternate method of getting json data.

parent 4c7b8625
......@@ -6,9 +6,11 @@ app = Flask(__name__)
@app.route('/',methods=['POST'])
def foo():
data = json.loads(request.data)
print("New commit by: {}".format(data['commits'][0]['author']['name']), file=sys.stderr)
return "OK"
data = request.get_json()
#~ data = json.loads(request.data)
print("New commit by: {}".format(data['commits'][0]['author']['name']), file=sys.stderr)
print("Header: ", request.headers)
return "OK"
if __name__ == '__main__':
app.run(port=7080)
app.run(port=7080)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment