I am insanely green for WSGI in the Google App Engine (GAE).
How to set content type in JSON? This is what I still have:
class Instructions(webapp.RequestHandler): def get(self): response = {} response["message"] = "This is an instruction object" self.response.out.write(json.dumps(response)) application = webapp.WSGIApplication([('/instructions', Instructions)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main()
In addition, I create several RESTful services, nothing complicated. When I developed at JAVA, I used retouching. Is there a more efficient framework than WSGI? The only reason I use WSGI is because they were used in the App Engine tutorial.
Thanks!
Chris dutrow
source share