Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the above JSON formatted response, each user is listed with its relevant field content (UserID, FirstName, and LastName). Each user also includes a self link, associated to the href field, that informs the client how to retrieve this resource. Thus, RESTful responses include content that is both meaningful to humans and machines. As can be seen, clients do not need to be programmed how to retrieve specific users. This information will always be provided in the API response.

There is no established way to handle method for handling HATEOAS (or Hypermedia) designed responses. ) responses. There are several formats which have been proposed, but a few have risen to notable prominence. One of them, known has HAL (Hypertext Access Language), is what is represented in the above response. This is why the Content-Type response header has a value of application/hal+json. To help API developers generate hypermedia responses (and thus make their APIs more REST compliant), the SRP HTTP Framework provides the HTTP_JSON_SERVICES function. This function provides several helper services to make it easier to build HAL+JSON formatted responses.

Two of the most notable features of RESTful web APIs are:

...