REST. AccountController

5.1 REST AccountController

  • PUT http://localhost:8080/api/account
    Content-Type: application/json
    Authorization: Basic user@gmail.com password
    
    {
      "email": "user@gmail.com",
      "firstName": "New_First",
      "lastName": "New_Last"
    }
    ###
    
    
  • GET http://localhost:8080/api/account
    Authorization: Basic user@gmail.com password
    ###
    
    
  • POST http://localhost:8080/api/account/register
    Content-Type: application/json
    
    {
      "email": "test@test.com",
      "firstName": "Test",
      "lastName": "Test",
      "password": "test"
    }
    ###
    
    
  • GET http://localhost:8080/api/account
    Authorization: Basic test@test.com test
    

5.2 Error handling

PUT http://localhost:8080/api/account
Content-Type: application/json
Authorization: Basic user@gmail.com password

{
  "id": 7,
  "email": "user@gmail.com",
  "firstName": "New_First",
  "lastName": "New_Last"
}
###

5.3 Добавление HATEOAS в AccountController. Paging