Created
November 8, 2012 19:40
-
-
Save enigmaticape/4041041 to your computer and use it in GitHub Desktop.
Teeny tiny webpy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import web | |
urls = ( | |
'/', 'index' | |
) | |
class index: | |
def GET (self): | |
return "Post some data!" | |
def POST (self): | |
print web.data() +"\n" | |
return "You Sent : \n\"" + web.data() + "\"\n" | |
if __name__ == "__main__": | |
app = web.application(urls, globals()) | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example code from a post discussing web servers at Enigmatic Ape blog http://www.enigmaticape.com/blog/a-minimalish-objective-c-http-server/