HTTP 302 is a temporary redirect . You need to handle this.
According to the standard, if you receive a 302 response, the response will contain a Location header field with a redirect:
Client request:
GET /index.html HTTP/1.1
Host: www.example.com
Server response:
HTTP/1.1 302 Found
Location: http://www.redirected-address.example.com/
You need to extract the new URL from the response. (Use getHeaderField("Location")to do this). Then follow the same method at the new URL that you received.
Two other points:
, URL. , 302, URL- "".
GET HEAD, . . RFC .