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.
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} />