React Native Application中的未知HTTP GET请求

时间:2019-07-17 07:33:40

标签: reactjs react-native redux realm realm-js

我们的测试人员在我们的React Native应用程序中进行API测试时捕获了一些未知的GET请求。

GET /inspector/device?name=some_unique_id&app=com.companyname.appname HTTP/1.1

Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: encrypted key
Sec-WebSocket-Version: 13
Host: localhost:8082
Accept-Encoding: gzip, deflate
User-Agent: okhttp/3.11.0

有人可以告诉我这是什么,为什么叫它??

谢谢。

1 个答案:

答案 0 :(得分:0)

似乎该行可能来自RCTInspectorDevServerHelper.mm。您可以看到

return [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/inspector/device?name=%@&app=%@",
                                                        getServerHost(bundleURL, inspectorProxyPort),
                                                        escapedDeviceName,
                                                        escapedAppName]];

内部 getInspectorDeviceUrl 函数,该函数似乎在每次加载应用程序以与捆绑软件连接时调用。