diff --git a/JerseyTest/src/main/java/jerseyTest/resources/NekoRest.java b/JerseyTest/src/main/java/jerseyTest/resources/NekoRest.java new file mode 100644 index 0000000..cda6f76 --- /dev/null +++ b/JerseyTest/src/main/java/jerseyTest/resources/NekoRest.java @@ -0,0 +1,24 @@ +package jerseyTest.resources; + +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; + +@Path("/neko") +public class NekoRest { + 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; + } +}