Integration with React Native
v2.x
The SDK can be integrated into React Native projects.
-
Add the SDK to your Android project as described above.
-
The automatic interceptor is not supported in React Native, so any request from the JavaScript code has to be handled manually.
-
Disable the automatic interception as described above.
-
Create a native module as described here.
-
Create a function that pass the HTTP headers from the HUMAN SDK to the JavaScript code. Here is an example:
-
In your JavaScript code, send your request with those HTTP headers. Here is an example:
-
Next, pass the response back to the native module. Here is an example: