The POST method

The following screenshot shows how to fire a POST request to create a new user:

The following snippet shows the response:

    {      "userid": "UserId5",      "name": "User Name 5",      "_links": {       "self": {         "href": "http://localhost:8080/users/5"            },      "user": {         "href": "http://localhost:8080/users/5"          },      "todos": {         "href": "http://localhost:8080/users/5/todos"         }       }    }

The response contains the URI of the created resource--http://localhost:8080/users/5.

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.