Jersey jax.rs client 2.5 follow redirect from HTTP to HTTPS

后端 未结 3 733
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-11 11:47

I have a setup where tomcat server hosting my REST servers redirects calls from HTTP (port 9080) to HTTPS ( port 9443 ).

I\'m using jersey 2.5 implementation and can

3条回答
  •  独厮守ぢ
    2021-01-11 12:01

    correct way to do this is:

    webTarget.property(ClientProperties.FOLLOW_REDIRECTS, Boolean.TRUE);
    

提交回复
热议问题