that line is for client mode. If the client is using access point mode, you don’t need to use digest authentication.
I’m not familiar with React Native and do not know JavaScript very well.
In other languages, I know that the camera.getLivePreview is set up differently and you need to accept a stream.
For example, in Dart, you need to accept an async stream and set up a listener on the stream.
There’s likely JavaScript tutorials on the Internet that show how to use stream listeners.
As far as the API command is concerned, the way to start the stream is simple. Even though the command below is in dart, you can likely figure out that the API command is simple.
Uri url = Uri.parse('http://192.168.1.1/osc/commands/execute');
var request = http.Request('POST', url);
Map<String, String> bodyMap = {"name": "camera.getLivePreview"};
request.body = jsonEncode(bodyMap);
Map<String, String> headers = {
"Content-Type": "application/json; charset=UTF-8"
};