def raise_201(instance, location):
    """Abort the current request with a 201 (Created) response code. Sets the
    Location header correctly. If the location does not start with a slash,
    the path of the current request is prepended.

    :param instance: Resource instance (used to access the response)
    :type instance: :class:`webob.resource.Resource`
    :raises: :class:`webob.exceptions.ResponseException` of status 201
    """
    _set_location(instance, location)
    instance.response.status = 201
    raise ResponseException(instance.response)
Abort the current request with a 201 (Created) response code. Sets the
    Location header correctly. If the location does not start with a slash,
    the path of the current request is prepended.

    :param instance: Resource instance (used to access the response)
    :type instance: :class:`webob.resource.Resource`
    :raises: :class:`webob.exceptions.ResponseException` of status 201