Projects tigase _server tigase-http-api Issues #26
List of available endpoints (#26)
wojciech.kapcia@tigase.net opened 9 years ago
Due Date
2016-05-30

I think it could be helpful to list all available endpoints on the main HTTP API page (i.e.: @http://hostname:8080/@). Currently we serve 404 Not Found / No context found for request which is not very informative. We already serve helpful page on the @/rest/@, and on the main we could list @admin/@, @ui/@, etc. (and in the future maybe include some basic health information as to be done in other ticket).

In addition we can add property to each endpoint indicating whether it's public or private and whether should be listed.

Does it make sense? %kobit?

Andrzej Wójcik (Tigase) commented 9 years ago

I implemented list of available endpoints which looks similar to REST API description page.

I also fixed support for requests to endpoints bare URIs without trailing slash. Now in embedded HTTP server it will send redirect to URI with trailing slash - same thing is done by other web servers.

wojciech.kapcia@tigase.net commented 8 years ago

I've tested it and it looks like it generates empty redirection and ultimately doesn't work:

$ telnet node1.xmpp-test.net 8080
Trying 198.27.120.214...
Connected to node1.xmpp-test.net.
Escape character is '^]'.

GET / HTTP/1.1
Host: node1.xmpp-test.net

HTTP/1.1 302 Temporary Redirect
Date: Mon, 30 May 2016 12:56:18 GMT
Transfer-encoding: chunked
Location: //
Andrzej Wójcik (Tigase) commented 8 years ago

I fixed issue with wrong redirection. Next build will contain this fix.

wojciech.kapcia@tigase.net commented 8 years ago

Works great now!

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
RedmineID
4206
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-http-api#26
Please wait...
Page is in error, reload to recover