Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to execute OPTIONS request for a link #39

Closed
Ickbinet opened this issue Nov 5, 2021 · 6 comments
Closed

Add option to execute OPTIONS request for a link #39

Ickbinet opened this issue Nov 5, 2021 · 6 comments

Comments

@Ickbinet
Copy link

Ickbinet commented Nov 5, 2021

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.

@toedter
Copy link
Owner

toedter commented Nov 5, 2021

That sounds like a good idea, I'll take a look at it.

@toedter
Copy link
Owner

toedter commented Nov 13, 2021

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.

toedter added a commit that referenced this issue Nov 14, 2021
@toedter
Copy link
Owner

toedter commented Nov 20, 2021

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

@toedter toedter closed this as completed Nov 20, 2021
@Ickbinet
Copy link
Author

So it is activated by httpOptions=true in the URL?

@toedter
Copy link
Owner

toedter commented Nov 23, 2021

yes, there is also a menu entry that you can select in the Settings menu.

@toedter
Copy link
Owner

toedter commented Feb 26, 2022

released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants