Add option to execute OPTIONS request for a link
Ickbinet opened this issue · comments
It would be nice if the explorer had an option where the user can decide if for a single or each link an OPTIONS request should be executed.
The allow response header could be used to enable/disable the request buttons besides the link.
That sounds like a good idea, I'll take a look at it.
My current assumption for HAL-FORMS was that all the links are GET only, while _templates are used for all affordances that define a specific HTTP method. On the other hand, a link in HAL-FORMS could be anything, so it would also make sense to use options for HAL-FORMS links.
It is implemented in the current snapshot. You can test it:
For HAL: Chatty API (Spring Data REST Backend): https://chatty42.herokuapp.com/hal-explorer/index.html#theme=Cosmo&httpOptions=true&uri=/api/
For HAL-FORMS: Movies API (Spring HATEOAS Backend): https://hypermedia-movies-demo.herokuapp.com/hal-explorer/index.html#theme=Cosmo&httpOptions=true&uri=https://hypermedia-movies-demo.herokuapp.com/api/movies
So it is activated by httpOptions=true in the URL?
yes, there is also a menu entry that you can select in the Settings menu.
released