Skip to content

volyx/natty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Natty - netty JAX-RS implementation.

Implementation supports subset of JAX_RS specification annotations.

Build Status

codecov

Example

@Path("/")
public class HttpRestAPI {

    @GET
    @Path("{name}")
    public Response getDashboard(@PathParam("name") String name) {
        return Response.ok("Hello " + name + "!");
    }

    public static void main(String[] args) {
        List<Object> handlerList = new ArrayList<>();
        handlerList.add(new HttpRestAPI());
        try {
            BaseServer server = new BaseServer("127.0.0.1", 9191, new TransportTypeHolder(1), handlerList)
                .start();
        } catch (Exception e) {
           throw new RuntimeException(e);
        }
    }
}
curl http://localhost:9191/world

Releases

No releases published

Packages

No packages published

Languages