Is it possible to modify the HTTP request headers of a React Native WebView component on iOS?
I'm aware of the onShouldStartLoadWithRequest
function but this doesn't seem to allow any possibility for modification.
You can put your request header on attribute headers
like this:
<WebView source={{
uri: "http://blog.apentle.com/",
headers: {
Authorization: "Basic YXBlbnRsZS5jb206YXBlbnRsZQ==",
}
}}
style={styles.webview} />
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