문제

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