質問

I'm using idhttp to get content of a site. After get the content, the site will change URL from www to www8 or www9 or www10, for example: www.sample.com is before posting, after posting it will be www10.sample.com. How to get it? Thank you.

役に立ちましたか?

解決

What you are encountering is likely an HTTP redirect. TIdHTTP handles redirects automatically if its HandleRedirects property is set to True. TIdHTTP has an OnRedirect event so you can get the new URL being redirected to, or you can look at the TIdHTTP.Response.Location property (which can also be filled in by some non-redirect responses as well, such as when uploading a file to Amazon S3 via TIdHTTP.Put()).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top