WSDelete

In order to remove an existing resource, you set the WSDelete attribute.

Syntax

WSDelete

Usage

You use this attribute to specify the action of the HTTP verb DELETE to delete a resource. You set the WSDelete attribute in the ATTRIBUTES() clause of the function.

Example using WSDelete to delete a resource

PUBLIC FUNCTION deleteUserProfile(
    id STRING ATTRIBUTE(WSParam) )
  ATTRIBUTES (WSDelete,
              WSPath="/users/{id}",
              WSDescription='Deletes a user profile',
              WSThrows='404:user not found')
  RETURNS STRING
    DEFINE ret STRING
    # ... function code  ...
    LET ret = SFMT("Deleted user with ID: %1",id)
    RETURN ret
END FUNCTION
In this example the resource specified in the URL is deleted.
http://host:port/gas/ws/r/xcf/users/xxx
xxx is the user id replaced in the Genero BDL function.