I want to send form data values to my webview url before it loaded. I'm getting this values from redux.
This is what I tried. But It's not working
let token=this.props.usersData ? this.props.usersData.token : null
let currencyValue=this.props.usersData ? this.props.usersData.currencyValue :null
let paymentValue=this.props.usersData ? this.props.usersData.paymentValue : null
let formdata = new FormData();
formdata.append("token", token)
formdata.append("currencyValue", currencyValue)
formdata.append("paymentValue", paymentValue)
return (
<WebView
style={styles.webView}
scrollEnabled={true}
source=
{{uri: 'https://myweb.com/tokenization?type=datasave&test=yes',
headers: { 'Content-Type': 'application/x-www-form-urlencoded', body:formdata }}}
/>
);
Please note that props values are getting without any issue (no null values there)