Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. def cb_handle(args):
  2. req = args["request"]
  3. pyhttp = req.get_http()
  4.  
  5. if pyhttp.startswith("/postprocess"):
  6. # run your post processing code here and put output somewhere
  7.  
  8. resp = req.get_response()
  9. resp.set_status("200 OK")
  10. resp.add_header("Content-type", "text/html")
  11. resp.write("<html><body>")
  12. resp.write("<p>done!</p>")
  13.  
  14. # dump your output here
  15.  
  16. resp.write("</body></html>")
  17. return 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement