The GET method

When we send a GET request to http://localhost:8080/users, we get the response shown here. The response is edited to remove the details of UserId2, UserId3 and UserId4 for brevity:

    {      "_embedded" : {      "users" : [ {                   "userid" : "UserId1",                   "name" : "User Name 1",                   "_links" : {                     "self" : {                        "href" : "http://localhost:8080/users/1"                        },                     "user" : {                        "href" : "http://localhost:8080/users/1"                       },                    "todos" : {                         "href" : "http://localhost:8080/users/1/todos"                        }                     }               } ]       },      "_links" : {         "self" : {                  "href" : "http://localhost:8080/users"                  },                "profile" : {                      "href" : "http://localhost:8080/profile/users"                       },                "search" : {                      "href" : "http://localhost:8080/users/search"             }     },     "page" : {             "size" : 20,             "totalElements" : 4,             "totalPages" : 1,             "number" : 0            }     }

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.