def _finish_ok(response_data=None, content_type=u'json', resource_location=None):
 status_int = 200
 headers = None
 if resource_location:
  status_int = 201
  try:
   resource_location = str(resource_location)
  except Exception as inst:
   msg = (u"Couldn't convert '%s' header value '%s' to string: %s" % (u'Location', resource_location, inst))
   raise Exception(msg)
  headers = {u'Location': resource_location}
 return _finish(status_int, response_data, content_type, headers)

def _finish_ok ( response_data = None , content_type = u'json' , resource_location = None ) : status_int = 200 headers = None if resource_location : status_int = 201 try : resource_location = str ( resource_location ) except Exception as inst : msg = ( u"Couldn't convert '%s' header value '%s' to string: %s" % ( u'Location' , resource_location , inst ) ) raise Exception ( msg ) headers = { u'Location' : resource_location } return _finish ( status_int , response_data , content_type , headers )
if a controller method has completed successfully then calling this method will prepare the response .