EddyVerbruggen / nativescript-webview-utils

🕸Add request headers to a NativeScript WebView. Perhaps more utils later.
Apache License 2.0
20 stars 17 forks source link

iOS - WebView - Forms Will Not Submit Using Post Method #11

Closed pap5508 closed 5 years ago

pap5508 commented 6 years ago

https://github.com/NativeScript/nativescript-angular/issues/1270

EddyVerbruggen commented 6 years ago

Not at the moment. There's an issue with POST, that's for sure.

EddyVerbruggen commented 6 years ago

I would have probably responded if that was the case.

dgt009 commented 6 years ago

Even I’m facing the same issue. What’s the way forward for this issue? Any suggestion?

pap5508 commented 6 years ago

@EddyVerbruggen : have you worked on this.. ??

EddyVerbruggen commented 6 years ago

Noooooo

alonstar commented 6 years ago

Android has the same issue. I removed (loaded)="webViewLoaded($event)" it's work!

tns-core-modules 4.2.0 Android API 19

But I tried my IOS is work.

davecoffin commented 5 years ago

@EddyVerbruggen im happy to fork this and try and fix this bug, but some direction would be appreciated if you have some ideas of why this breaks POST data in webview.

davecoffin commented 5 years ago

Ok, I've gotten a little closer but still cant figure out how to add the headers before the request then continue with it. Because what is happening is that on every request, the plugin adds the headers, then discards that request. So the POST request is getting discarded with decisionHandler(WKNavigationActionPolicy.Cancel);, then when the new request is evaluated its a GET, not a POST and the data is gone. So navType is other instead of formSubmitted. So I think we either need to pass the params from the first request to the second, or add the headers before so the normal flow can continue.

@EddyVerbruggen thoughts?