return json from post request python 3.6 + http.server.SimpleHTTPRequestHandler code example Example: python3 webserver command line python3 -m http.server