Catch "302 Found" when using the GWT RequestBuilder

I have a service that responds with an HTTP Status Code 302 Found. When you call it with RequestBuilder.send(), I am automatically redirected so that the final URL is not equal to the URL originally set for RequestBuilder.

I need at least the URL that the service wants to forward to me, in other words, the header of the Locationfirst response.

Is it possible to prevent request forwarding? Or can I check the URL with the final answer?

+3
source share
1 answer

Probably not. RequestBuilder is implemented as XMLHttpRequest, which does not provide redirect feedback.

Xmlhttprequest.

+3

Source: https://habr.com/ru/post/1788036/


All Articles