REST. AccountController

5.1 REST AccountController

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

5.2 Error handling

PUT http://localhost:8080/api/account
Content-Type: application/json
Authorization: Basic [email protected] password

{
  "id": 7,
  "email": "[email protected]",
  "firstName": "New_First",
  "lastName": "New_Last"
}
###

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