I have a url I want to open in my app using WebView
to avoid the user having to be redirected out of the app to the mobile browser. However the the web page I want to show requires some post parameters like from a post form. If it was a GET situation I woul'd have simply appended the parameters to the url.
<WebView
source={{uri: 'https://mypage.com/index.php', headers: '---', body: '---'}}
style={{marginTop: 20}}
/>
Do I put them in headers
or in body
, and in what format? Or is there another way? I would like to have the parameters in a key value format i.e cat=himalayan&dog=pug&fish=shark
Put this piece of code in the body:
{ source: { uri: 'https://mypage.com/index.php', method: 'POST', body:
'cat=himalayan&dog=pug&fish=shark' }
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