West Wind Internet and Client Tools
How to handle HTTP Redirect error responses from a Web API
Gravatar is a globally recognized avatar based on your email address. How to handle HTTP Redirect error responses from a Web API
  Gary Beasley
  All
  Jun 26, 2019 @ 11:27am

We use the wwHTTP client in all of our apps. We are calling controllers on a Web API behind the Azure cloud. Most hits ( POST, PUT etc ) do not have a problem, but we sometimes get a response from calling a POST using wwHTTP which says: Error 12168 - The HTTP redirecdt request must be confirmed by the user. I've seen workarounds by doing the following: new HttpClient(new HttpClientHandler { AllowAutoRedirect = false }); so I was wondering is there any such property on the wwHTTP class that can do something similar.

Thanks in advance. This is a hard one to track down.

Gravatar is a globally recognized avatar based on your email address. re: How to handle HTTP Redirect error responses from a Web API
  Rick Strahl
  Gary Beasley
  Jun 26, 2019 @ 12:11pm

You can use nHttpServiceFlags = INTERNET_FLAG_NO_AUTO_REDIRECT to specify not following redirects (WinInet Setting):

+++ Rick ---

© 1996-2019