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()
).
How get URL after using idhttp post
Pergunta
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.
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow