In an app I'm building using the ionic framework (based on Cordova) I'm using the Cordova InAppBrowser to visit a url, but I want to set custom headers for that request. I've read over the readme and some other sites, but I can't find anything.
Does anybody know how I can set headers in the Cordova InAppBrowser? All tips are welcome!
function openBrowser() { var url = 'https://cordova.apache.org'; var target = '_blank'; var options = "location = yes" var ref = cordova. InAppBrowser. open(url, target, options); ref. addEventListener('loadstart', loadstartCallback); ref.
The InAppBrowser is a web browser view that displays when calling [window. open](window. open. html)() , or when opening a link formed as <a target="_blank"> .
There is no action to close the InAppBrowser. How can we achieve this? The user is redirected to an aws login page in the IAB and after suscessfull login the IAB should close and the user should be redirected to a screen in the app.
As far as I now know this could not be done. So I opted for an alternative solution in which I gave the params via the url. I could do this because I also controlled the url which I wanted to open. So it worked, but it wasn't ideal.
Anyway, maybe this can help other people.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With