Versions Compared

Key

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

...

HTTP also provides a set of response status codes that inform the client how the request was handled. For example: 200 means OK, 201 means a new resource was created, 404 means the resource does not exist, 405 means the HTTP method is not supported, etc. Servers should send back the most applicable status code and clients should attempt to handle any valid status code appropriately.

The most significant, albeit the most misunderstood and underutilized, An important aspect of the Uniform Interface , constraint is described as Hypermedia As The Engine Of Application State (, or HATEOAS). We have a dedicated page to the question, "What is HATEOAS?", but we'll provide a simple explanation of it here. HATEOAS is a design feature where information about the state of a resource should be provided to the client through hyperlinks (aka hypermedia). This avoids the need for maintaining state and it avoids the need for the client to assume (or hardcode) how to request a state change to the server. Applying HATEOAS to API responses adds requests are made. Incorporating HATEOAS to the design of web APIs requires a fair amount of extra work and careful designplanning. This often leads to what drives many developers refer to opt out of HATEOAS. This is often referred to as practical REST which is contrasted with  whereas purist REST includes and advocates for HATEOAS. Regardless of the internal debating that continues to go on with this subject, Drongoing internal debates, Dr. Fielding himself has writtenexpressed his feelings rather clearly, "...if the engine of application state (and hence the API) is not being driven by hypertext, then it cannot be RESTful and cannot be a REST API" (emphasis added).

...