Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 744 Bytes

README.md

File metadata and controls

17 lines (12 loc) · 744 Bytes

Adding REST API to Python App

Just some example code using timeouts in BaseHTTPServer to add a REST API to a Python app.

Currently, the app will exit once a POST request is sent to the web server on port 1024. There is no additional processing being done, but whatever it is, should be done fairly quickly to allow the app to check for any pending HTTP requests.

No authentication enabled, no SSL. Not Production ready!

References

https://docs.python.org/3/library/http.server.html#http.server.BaseHTTPRequestHandler