I'm currently working on integrating with a web service that does not support OAuth but requires a login via a web form. I'm able to submit the login via a POST request as normal; however, on successful login, the service responds with a 302 redirect, and the way that makeWebRequest handles that redirect is really bizarre (possibly a bug).
What I'm seeing in the HTTP traffic logs for the simulator is that it makes the original POST request, which succeeds, then gets the 302 redirect in response. From there, it seemingly proceeds to make a second POST request automatically at the redirected location with the same headers but no POST body (and also no "Content-Length" header). The service then responds with a 411 error (which is the response ultimately passed to the response callback) complaining that the content length wasn't specified, ending the interaction.
Is there any way to alter this behavior, preferably to have the 302 response be something that is returned in the response callback and can be manually handled? And is there any documentation on the redirect behavior of makeWebRequest? In all of the documentation I've searched through, nothing addresses redirects. The only reference to it I've seen at all are in two other forum posts here, both of which mostly just suggest to stand up an intermediate server to deal with the redirects, which I'd really prefer to avoid if at all possible:
Any insight would be greatly appreciated!