silkimen / cordova-plugin-advanced-http

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
400 stars 318 forks source link

307 redirect not handled #145

Open monkeychops opened 5 years ago

monkeychops commented 5 years ago

Hi there,

Firstly, great work with the plugin, it's really saved my ass so far getting around the forced CORS implementation with WKWebview.

I'm just in the process of upgrading my Ionic application to cordova-plugin-ionic-webview 2.0 and the plugin works great for both iOS and Android. BUT. I'm now integrating with a 3rd party API that responds with a 307 redirect which I can see is not handled by the plugin. Any plans to do add this feature in the future?

Many thanks

monkeychops commented 5 years ago

Anyone got any thoughts on this?

mg-partec commented 5 years ago

Hi there,

did you already try to force the redirection by using something like: this.http.disableRedirect(false); ? I had to disable redirects in my Ionic project because of an open issue with cookies, you can find my workaround in #148. Maybe you can re-use my code to handle the 307 redirects as well.

Hope it helps! Mat

monkeychops commented 5 years ago

Thanks for your response. I did actually end up with a very similar solution, but it's a little messy in the client. Just thought I'd check to see if there are any plans to handle it in the plugin :)

silkimen commented 5 years ago

Hi guys, thanks for reporting this issue! It's a bug, which I'll need to fix. But it's easy to work around, so I won't handle this with high priority.

zivlevy commented 2 years ago

any solution for 307 redirect not handled ?