I'm using Spring Data Rest. I can access a resource from the command line using httpie with:
http :8080/myapp/books
but if I try to access the root URI
http :8080/myapp
I obtain a 302 redirection:
HTTP/1.1 302
Date: Wed, 21 Dec 2016 13:30:57 GMT
Location: http://localhost:8080/myapp/
Transfer-Encoding: chunked
Testing this url in Firefox redirects me to http://localhost:8080/myapp/
and display correctly the list of resources. If I add a trailing slash with httpie:
http :8080/myapp/
I obtain the list of resources. Why do I have to add a trailing slash to avoid the redirect? Can someone explain me the logic behind this behavior?
P.S.: I'm running the application with Spring Boot, from STS.