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

Getting HEAD url 405 () error when clicking on NON-GET #93

Open
brocoly27 opened this issue May 8, 2017 · 1 comment
Open

Getting HEAD url 405 () error when clicking on NON-GET #93

brocoly27 opened this issue May 8, 2017 · 1 comment

Comments

@brocoly27
Copy link

Hi, I'm playing with string boot and the HAL browser but I'm getting 405 every time I click on 'Non Get' icon.
I'm new with this tool and I'm not sure what I'm missing. I have an existing REST service created with Spring using @RestController, my endpoint is:
POST http://localhost:8080/api/v1/invoice/report/request
and I have that endpoint registered on the Hal Browser at http://localhost:8080/. This is the what I see on the screen:

{ "_links": { "invoicing:request": { "href": "http://localhost:8080/api/v1/invoice/report/request" }, "profile": { "href": "http://localhost:8080/profile" } } }

However, on the left side (NON-GET column) I'm unable to see the popup dialog to Make a Request, I'm not sure what I'm doing wrong.

Thanks

Note. Something I noticed is that if my endpoint is GET, then I do see the popup.

@Laures
Copy link

Laures commented Apr 12, 2018

Hal browser makes a HEAD request to your provided link to check headers. Spring mvc only provides HEAD support for endpoints that serve GET-Requests.

since your endpoint only serves post requests the Head request fails. imho this is a bug. the head failure should be ignored and the normal make a non-get request be shown. (this is basicly what already happens if you force the issue by calling the correct hal browser url yourself)

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