Archived Forum Post

Index of archived forum posts

Question:

SynchronousRequest - Where is a 301 response returned?

Apr 16 '17 at 18:31

I will be POSTing multi-part form data using SynchronousRequest to a https website. Two questions....

  1. Assuming I have FollowRedirects = True, do I receive a notification that a 301 was returned and if so where will it be? Also, can I pick up the new url and port from somewhere?
  2. Same circumstances but with FollowRedirects = False, same questions as (1).

Thank you Ian

p.s. As an explain - I have been told that if the program receives a 301 (or other redirect) to a NONE-https url then the program should treat it as an error and not follow the redirect. If I get a valid https redirect the program should remember the url and port and use it for the current and future posts.


Answer

Ooooo! I just found the HTTPRedirect event - that looks like the way to do it!