A server that echoes data POSTed with flask / python

Used for debugging webhooks

python


from flask import Flask, request
app = Flask(__name__)

@app.route("/", methods=['POST'])
def webhook():
    print request.headers
    print "body: %s" % request.get_data()
    return request.get_data()

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

Recommended Posts

A server that echoes data POSTed with flask / python
Launch a web server with Python and Flask
Creating a Flask server with Docker
A memo that reads data from dashDB with Python & Spark
[Python] A program that creates stairs with #
Add a Python data source with Redash
A typed world that begins with Python
Create test data like that with Python (Part 1)
Create a page that loads infinitely with python
Start a simple Python web server with Docker
Folium: Visualize data on a map with Python
I made a Mattermost bot with Python (+ Flask)
Extract data from a web page with Python
Data analysis with python 2
Data analysis with Python
Local server with python
Programming with Python Flask
Until you install Python with pythonbrew and run Flask on a WSGI server
Create an animated GIF local server with Python + Flask
Get financial data with python (then a little tinkering)
A simple Python HTTP server that supports Range Requests
[Python] I tried running a local server using flask
A memo that I touched the Datastore with python
Create a fake Minecraft server in Python with Quarry
A Python program that converts ical data into text
[Vagrant] Set up a simple API server with python
Sample data created with python
Get Youtube data with python
Easy HTTP server with Python
Web application with Python + Flask ② ③
Create a directory with python
Web application with Python + Flask ④
Read json data with python
Published a library that hides character data in Python images
Let's create a script that registers with Ideone.com in Python.
I made a simple book application with python + Flask ~ Introduction ~
Build a Python environment and transfer data to the server
<Python> Build a dedicated server for Jupyter Notebook data analysis
Library for specifying a name server and dig with python
A Python program that aggregates time usage from icalendar data
A python script that converts Oracle Database data to csv
[Python] Extracts data frames that do not match a specific column with other data frames of Pandas
[Python] What is a with statement?
[Python] Make a graph that can be moved around with Plotly
[Python] Draw elevation data on a sphere with Plotly and draw a globe that can be rotated round and round
Solve ABC163 A ~ C with Python
Operate a receipt printer with python
A python graphing manual with Matplotlib.
I made a package that can compare morphological analyzers with Python
SNS Python basics made with Flask
I want to use a wildcard that I want to shell with Python remove
[AWS] Flask application deployment version that tried to build a Python environment with eb [Elastic Beanstalk]
Make multiple numerical elevation data into a single picture with Python
Solve ABC166 A ~ D with Python
Build a detonation velocity website with Cloud Run and Python (Flask)
Persist Flask API server with forever
[Python] A memo that I tried to get started with asyncio
[Python] Use Basic/Digest authentication with Flask
Create a virtual environment with Python!
[Python] Get economic data with DataReader
I made a fortune with Python.