Skip to content

Instantly share code, notes, and snippets.

@Elrhino
Last active December 11, 2018 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elrhino/82fe9473f12077a9744a to your computer and use it in GitHub Desktop.
Save Elrhino/82fe9473f12077a9744a to your computer and use it in GitHub Desktop.
Code snippets from toaster launcher part 2
import javax.ws.rs.Consumes;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import com.gwtplatform.dispatch.rest.shared.RestAction;
import static com.projectname.project.client.api.ApiPaths.TOASTER;
@Path(TOASTER)
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface ToasterResource {
@GET
RestAction<Toaster> getToaster();
@POST
RestAction<Void> launch(@FormParam("coordinates") String coordinates, @FormParam("power") String power);
}
@EgorUsp
Copy link

EgorUsp commented Dec 11, 2018

Where i can find .TOASTER ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment