asolfre / appengine-rest-server

Automatically exported from code.google.com/p/appengine-rest-server
Other
0 stars 0 forks source link

TypeError: unbound method set_response_content_type #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
resources = rest.Dispatcher

app = webapp2.WSGIApplication([
  ('/', MainPage),
  ('/sign', Guestbook),
  ('/resources/.*', resources)
], debug=True)

resources.set_response_content_type(set_response_content_type='application/json'
)
resources.base_url = "/resources"
resources.add_models({
  "greeting": Greeting
})

Gets the error:

TypeError: unbound method set_response_content_type

Original issue reported on code.google.com by fritz.h...@gmail.com on 26 Jan 2013 at 1:51

GoogleCodeExporter commented 9 years ago
Yes, that is because this is invalid:

resources.set_response_content_type(set_response_content_type='application/json'
)

If you need to control the default output type, see the Dispatcher property 
"output_content_types".

Original comment by jahlborn@gmail.com on 26 Jan 2013 at 1:42