java - Get Jersey protocol from restlet -
is there way protocol used access restlet? implement different behavior when accessing servlet via https example. how can check this?
apparently, can inject httpservletrequest request this:
@put @path("{storage}/{repository}/{path:.*}") public void upload(@pathparam("storage") string storage, @pathparam("repository") string repository, @pathparam("path") string path, @context httpservletrequest request) throws ioexception, authenticationexception { system.out.println("using protocol " + request.getrequesturl().tostring().split(":")[0]); } and trick.
Comments
Post a Comment