Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is HttpClient redirection fixed?

User_LFTFIOct 14 2021

I`ve problem with HttpClient (OpenJdk 11).
Service deployed on kubernetes. Client use HttpClient to send POST request by https protocol.
HttpClient configured to always redirect.
We Got 405 response code - service`s endpoint can process only POST request, but got GET request, which get 405 error.
After turn of redirection policy on HttpClient, we found that on first request, client got 302 response.
In Always, Normal behavior HttpClient - such redirection lead to lost method of request (POST request resend as request with default method type - GET)
At now, I have to process 302 (or 301) redirection code to control method of request, but that is not convenient solution...

Comments

Post Details

Added on Oct 14 2021
0 comments
176 views