diff --git a/JerseyTest/src/main/java/jerseyTest/resources/GoriraRest.java b/JerseyTest/src/main/java/jerseyTest/resources/GoriraRest.java new file mode 100644 index 0000000..ca9ee74 --- /dev/null +++ b/JerseyTest/src/main/java/jerseyTest/resources/GoriraRest.java @@ -0,0 +1,24 @@ +package jerseyTest.resources; + +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; + +@Path("/Gorira") +public class GoriraRest { + String name = null; + + @GET + // @Produces(MediaType.APPLICATION_JSON) + @Produces(MediaType.TEXT_PLAIN) + public String getName() { + return name; + } + + @PUT + // @Produces(MediaType.APPLICATION_JSON) + @Produces(MediaType.TEXT_PLAIN) + public String loginAccount(@FormParam("name") String name) { + this.name = name; + return name; + } +}