-
Notifications
You must be signed in to change notification settings - Fork 28
[REST] Display a message on primary endpoint #68
Comments
This is currently not possible … Kind regards,
|
that was sad.. Do you know if someone is working on this so I can follow up on that? Currently I don't have the time to make a contribution my self at the moment, hopefully in a couple of months. Regards |
The source code is https://github.com/osgi/osgi.enroute.bundles/tree/master/osgi.enroute.rest.simple.provider https://github.com/osgi/osgi.enroute.bundles/tree/master/osgi.enroute.rest.simple.provider Since this is so little code it should not be very hard to add this feature here https://github.com/osgi/osgi.enroute.bundles/blob/master/osgi.enroute.rest.simple.provider/src/osgi/enroute/rest/simple/provider/RestMapper.java#L227 https://github.com/osgi/osgi.enroute.bundles/blob/master/osgi.enroute.rest.simple.provider/src/osgi/enroute/rest/simple/provider/RestMapper.java#L227 You could use a function that has some magic name like get$ to map to the empty path. That said, you could also switch to JAX-RS. The OSGi enRoute REST API is incredibly easy to use but was not designed to allow the implementation of all possible REST APIs. Its primary goal was to support calls from the Javascript code into the java OSGI code. Kind regards,
|
…int. If a method is named for the verb with no path given, provide from the root of the endpoint. Signed-off-by: Elias N Vasylenko <[email protected]>
I think the most natural system is to just use raw verbs |
…int. If a method is named for the verb with no path given, provide from the root of the endpoint. Signed-off-by: Elias N Vasylenko <[email protected]>
Simple response to feature request #68, enable primary rest endpoint.
Hi,
How do you choose what to return when the primary endpoint is called on your REST api?
I would like to return a String when a user calls GET on /rest
I'm not able to find any documentation on how to achieve this.
The text was updated successfully, but these errors were encountered: