Skip to content
Snippets Groups Projects
Select Git revision
  • 087e32fe8436bf2d7d3ca305bb84f5b1254dbe90
  • main default protected
  • version_pour_projet_2
  • dev
  • LIVRABLE_3
  • LIVRABLE_2
  • LIVRABLE_1
7 results

MyResource.java

Blame
  • MyResource.java 575 B
    package fil.sr2.flopbox;
    
    import jakarta.ws.rs.GET;
    import jakarta.ws.rs.Path;
    import jakarta.ws.rs.Produces;
    import jakarta.ws.rs.core.MediaType;
    
    /**
     * Root resource (exposed at "myresource" path)
     */
    @Path("myresource")
    public class MyResource {
    
        /**
         * Method handling HTTP GET requests. The returned object will be sent
         * to the client as "text/plain" media type.
         *
         * @return String that will be returned as a text/plain response.
         */
        @GET
        @Produces(MediaType.TEXT_PLAIN)
        public String getIt() {
            return "Got it!";
        }
    }