开发者

xmlHttpRequest and returned url

开发者 https://www.devze.com 2022-12-11 05:49 出处:网络
With help of xmlHttpRequest I开发者_开发问答 make aserver query. After that the server is redirecting to another page (e.g. \"http://site.com/index.html;var=123\")

With help of xmlHttpRequest I开发者_开发问答 make a server query. After that the server is redirecting to another page (e.g. "http://site.com/index.html;var=123")

The question is - how can I get full url(side.com/index.html;var...)?

The code is executed with Adobe Air.

thanks


I presume you mean, you are making an xmlHttpRequest inside the HTML control of Adobe Air. AIR provides no functionality on trapping calls originating from the web page that are not a part of the user action. Thus, your AJAX query will move the same way as in a browser. The only luck you may have is with JavaScript to trap the response of the call and use it.

On a side note, you may try loading the same URL with URLLoader/URLStream using a HEAD request in Adobe AIR, with URLRequest.followRedirects set to false. Then listen to HTTPStatusEvent and read the Location response header. HTH.

0

精彩评论

暂无评论...
验证码 换一张
取 消