Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Roman,
I have add HTTP header support for iOS and Android. I tried to modify as little as possible and it is non-contract breaking. I added a new option called "headers" that takes a JSON string of header key/value pairs. For example in my tests with a JWT token for authorization using your example:
BUT, and this is a big but, I have no idea how to actually test this in a Cordova environment.
Instead, for iOS I created a small single-page-view iOS sample app and had the ViewController use the PhotoViewer.m file the same way I believe Cordova is using it. The code was very straight-forward:
And for Android I created a single Activity app where the MainActivity calls the PhotoActivity.java:
I tried many variations of the parameters with both insecure and secure URLs and different options (I removed all the combinations from the sample above for readability). Everything appears to work as expected, at least from my test harnesses. If you want me to test further from Cordova I will need some help understanding how to actually do it.
Let me know what you think.
Thanks,
Steve