Skip to content

Instantly share code, notes, and snippets.

@ecarreras
Created July 17, 2017 11:30
Show Gist options
  • Select an option

  • Save ecarreras/d40059004897436fb255840397f30379 to your computer and use it in GitHub Desktop.

Select an option

Save ecarreras/d40059004897436fb255840397f30379 to your computer and use it in GitHub Desktop.

Revisions

  1. ecarreras created this gist Jul 17, 2017.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    from flask import Flask, request
    import time

    app = Flask(__name__)


    @app.route('/ARequest', methods=['POST'])
    def arquest():
    print "Writing a post!"
    with open('post-{}'.format(time.time()), 'w') as f:
    f.write(request.data)
    return "Ok", 200


    if __name__ == '__main__':
    app.run()