-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-17467] Android: Add setRequestHeaders() to WebView #8230
Conversation
Can one of the admins verify this patch? |
Very nice 👍 |
What about iOS ? |
@@ -272,6 +272,17 @@ methods: | |||
- name: password | |||
summary: Basic auth password. | |||
type: String | |||
|
|||
- name: setRequestHeaders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be a property and also return a getter to receive already stored request-headers. Otherwise, I can already see the improvement-ticket coming 😉
added
will return:
|
Sweet! Will plan the iOS-part then. @ashcoding to review for 6.1.0 :-) |
@hansemannn if you want to change something let me know and I'll adapt it. |
@m1ga is there any alternative website that I can use to easily test this? Perhaps something similar to httpbin.org? |
@ashcoding never heard about httpbin before. Looks awesome! https://httpbin.org/headers should work. Or try my test-page at http://migaweb.de/test.php |
I'm trying to do this in a classic app:
@m1ga I just get a blank screen with nothing loading. Seems like something is going on? @hansemannn could you try this whenever you have the time as well? |
@ashcoding if the setRequestHeaders is inside the button click event it works fine. Will check that tomorrow and fix the bug! |
I made that test to explicitly validate that the headers persist after reloading the page. So we just need to ensure iOS and Android behave the same. |
@ashcoding the problem is occuring with It would also be good to add a |
So this demo works fine now:
I've added some remarks about how to use setRequestHeaders() method on Android and added the iOS platform so you can merge the iOS PR afterwards |
Will you be addressing the issue that I brought up? @hansemannn what do you think? |
I'm fine with merging it, since - as he indicated - it is a general problem with Android-webviews that should be addressed separately. |
Roger. I'll give this PR one more review and get it merged if everything is good. |
Code functionally tested and reviewed. |
Thank you @m1ga |
JIRA: https://jira.appcelerator.org/browse/TIMOB-17467
Optional Description: