Versions Compared

Key

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

...

Using the AddFormAction Service

The previous services enable developers to described above add hypermedia that follow the in the form of URI relations using the reserved properties fromthe HAL specification (specifically the _links and _embedded reserved properties). While these URI URI relations provide valuable hypermedia to the client, many developers have expressed a desire for additional metadata to better instruct clients how to call the URI. For example, a URI by itself doesn't inform the client which HTTP methods are supported. Granted, the OPTIONS method is intended to provide this information, but other requirements might necessitate out-of-band knowledge. This causes our APIs to lose their self-documenting character.

...

Therefore, the SRP HTTP Framework uses the HAL specification as its base media type . The and the AddLinkRelationship, AddEmbeddedResources, and GetDatabaseItems services produce HAL compliant hypermedia. However, in those cases when a developer really wants to provide extra metadata to the client, we have provided the AddFormAction service. The AddFormAction service adds a custom hypermedia structure inspired by the work Ben Greenberg and his team did for the Comcast Xfinity APIs (you can watch his presentation on this here). To better explain the AddFormAction service, we have a dedicated article called How do I add hypermedia controls to a resource?.