Skip to content

hemantkumartank/basic-restful-webservices

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

#This project contains RESTful web services example built using Jersey 2.17

Adheres to Level 3 of Richardson Maturity Model(Fully RESTful API)

Topics Covered

1)GET,POST,PUT,DELETE operations
2)Sub resources GET,PUT,POST,DELETE operations
3)HATEOAS support
4)Exception mapper support
5)Covers @PathParam, @Path, @Consumes, @Produces, @BeanParam, @Context, @QueryParam, @CookieParam, @HeaderParam etc

Note: Go through the java docs. Each method has request response example. Use Advanced REST client or Postman plugins for the broswer

URI's

Note: This project needs to be refactored to use best practices which will be done later. As of now this code should be used only for understanding purposes.

Response sample
[
    {
        "firstName": "Forest",
        "id": 1,
        "joinedDate": "2016-03-16T16:58:18.186",
        "lastName": "Gump",
        "links": [
            {
                "rel": "self",
                "url": "http://localhost:8080/RESTfulWebServicesSample/rest/persons/1"
            },
            {
                "rel": "insurance",
                "url": "http://localhost:8080/RESTfulWebServicesSample/rest/persons/1/insurances/"
            }
        ]
    },
    {
        "firstName": "James",
        "id": 2,
        "joinedDate": "2016-03-16T16:58:32.164",
        "lastName": "Bond",
        "links": [
            {
                "rel": "self",
                "url": "http://localhost:8080/RESTfulWebServicesSample/rest/persons/2"
            },
            {
                "rel": "insurance",
                "url": "http://localhost:8080/RESTfulWebServicesSample/rest/persons/2/insurances/"
            }
        ]
    }
]

About

Basic RESTful Webservice Example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%