@POST @RequireApplicationAccess @Consumes(MediaType.APPLICATION_JSON) public JSONWithPadding executePost( @Context UriInfo ui, EntityHolder<Object> body, @QueryParam("callback") @DefaultValue("callback") String callback) throws Exception { logger.debug("ServiceResource.executePost"); Object json = body.getEntity(); ApiResponse response = createApiResponse(); response.setAction("post"); response.setApplication(services.getApplication()); response.setParams(ui.getQueryParameters()); ServicePayload payload = getPayload(json); executeServiceRequest(ui, response, ServiceAction.POST, payload); return new JSONWithPadding(response, callback); }
@DELETE @RequireApplicationAccess public JSONWithPadding executeDelete( @Context UriInfo ui, @QueryParam("callback") @DefaultValue("callback") String callback) throws Exception { logger.debug("ServiceResource.executeDelete"); ApiResponse response = createApiResponse(); response.setAction("delete"); response.setApplication(services.getApplication()); response.setParams(ui.getQueryParameters()); executeServiceRequest(ui, response, ServiceAction.DELETE, null); return new JSONWithPadding(response, callback); }