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

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -