I would like to run a script that will create a simple HTTP server and run a function for each request.
I am using Python to test an API that should give me a callback.
For now, I am using http://requestb.in/ to test the callback, but I would like to test it directly in my python script.
Is it possible to run a callback server bind on localhost:6548 and test something base on a request?
Thank you for your help.
You could use
wsgirefto host a simple WSGI web application. Example:This code creates a Python WSGI web application and serves that app on
http://localhost:6548.