# HG changeset patch # User Jeff Hammel # Date 1355078417 28800 # Node ID 7a3b21cafc009a7f852b91dd6560a9f131242e60 # Parent 5abe00d24a2f37710a73fb44e0452cc407046d6e start to sketch out REST API diff -r 5abe00d24a2f -r 7a3b21cafc00 wsgraph/web.py --- a/wsgraph/web.py Sun Dec 09 10:25:50 2012 -0800 +++ b/wsgraph/web.py Sun Dec 09 10:40:17 2012 -0800 @@ -2,12 +2,6 @@ """ web handler for WSGraph - -Formatters are keyed off of: -- (TODO) - -formatters = {0: { -} """ import json @@ -46,7 +40,19 @@ # HTTP methods def GET(self, request): - """respond to a GET request""" + """ + respond to a GET request + + Formatters are keyed off of + + formatters = {0: { + } + + API: + + ?format= + + """ segments = self.path_segments(request) @@ -56,8 +62,15 @@ body="WSGraph") def POST(self, request): - """respond to a POST request""" - raise NotImplementedError + """ + respond to a POST request + + API: + + ?update : + """ + + return exc.HTTPSeeOther('/') # TODO: /path/to/self def HEAD(self, request): """respond to a HEAD request"""