def on_post(self, req, resp, handler=None, **kwargs):
        """Respond on POST HTTP request assuming resource creation flow.

        This request handler assumes that POST requests are associated with
        resource creation. Thus default flow for such requests is:

        * Create new resource instance and prepare its representation by
          calling its creation method handler.
        * Try to retrieve URI of newly created object using
          ``self.get_object_location()``. If it succeeds use that URI as the
          value of ``Location`` header in response object instance.
        * Set response status code to ``201 Created``.

        Args:
            req (falcon.Request): request object instance.
            resp (falcon.Response): response object instance to be modified
            handler (method): creation method handler to be called. Defaults
                to ``self.create``.
            **kwargs: additional keyword arguments retrieved from url template.
        """
        obj = self.handle(
            handler or self.create, req, resp, **kwargs
        )
        try:
            resp.location = self.get_object_location(obj)
        except NotImplementedError:
            pass

        resp.status = falcon.HTTP_CREATED
def on_post ( self , req , resp , handler = None , ** kwargs ) : obj = self . handle ( handler or self . create , req , resp , ** kwargs ) try : resp . location = self . get_object_location ( obj ) except NotImplementedError : pass resp . status = falcon . HTTP_CREATED
Respond on POST HTTP request assuming resource creation flow.

        This request handler assumes that POST requests are associated with
        resource creation. Thus default flow for such requests is:

        * Create new resource instance and prepare its representation by
          calling its creation method handler.
        * Try to retrieve URI of newly created object using
          ``self.get_object_location()``. If it succeeds use that URI as the
          value of ``Location`` header in response object instance.
        * Set response status code to ``201 Created``.

        Args:
            req (falcon.Request): request object instance.
            resp (falcon.Response): response object instance to be modified
            handler (method): creation method handler to be called. Defaults
                to ``self.create``.
            **kwargs: additional keyword arguments retrieved from url template.