Created
April 28, 2017 00:34
-
-
Save andreburto/3930e0c10f9913e612329df4ef2e4824 to your computer and use it in GitHub Desktop.
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 | |
from exceptions import ValueError | |
urls = ('/', 'Index') | |
store_url = 'No_url' | |
class Index: | |
def GET(self): | |
return store_url | |
def POST(self, url=None): | |
if url: | |
store_url = url | |
return 'success' | |
else: | |
raise ValueError('No url provided') | |
app = web.application(urls, globals()) | |
if __name__ == '__main__': | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment