Skip to content

yousifS/rs-app-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Simple Rest API server

To compile

$ mvn clean package

To Run

$ java -cp target/dependency/*:target/rs-1.0-SNAPSHOT.jar  org.ys.tutorial.AppServer

To try it

$ curl -X GET http://localhost:8080/todo

$ curl -X PUT http://localhost:8080/todo -H 'content-type:Application/json' -d '{"description":"walk the dog"}'

$ curl -X PUT http://localhost:8080/todo -H 'content-type:Application/json' -d '{"description":"feed the cat"}'

$ curl -X GET http://localhost:8080/todo

$ curl -X POST http://localhost:8080/todo -H 'content-type:Application/json' -d '{"description":"feed the cat", "id":2, "done":true}'

$ curl -X GET http://localhost:8080/todo

$ curl -X DELETE http://localhost:8080/todo/1 

$ curl -X GET http://localhost:8080/todo

About

Example Rest API in Java using Grizzly+Jersey

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages