3
votes

I want to open web URL to start the corresponding activity with application. However I need to add header parameter to access web URL.

Linking.openURL(url).catch(err => console.error('An error occurred', err));

I don't find the the way of adding header parameter at react native doc.

1

1 Answers

0
votes

i think there is no way to set a request header while opening links with Linking API.

So whatever you want to pass to the application needs to be passed through the URL by appending some paramenters.

Example:

let url = 'http://example.com';
url +='?myparam=myvalue';

then you parse the url from the requested application to get the params.

If security is a concern then you may encrypt your myvalue and decrypt it on your requested application.