【问题标题】:Unknown HTTP GET request in React Native ApplicationReact Native 应用程序中的未知 HTTP GET 请求
【发布时间】:2019-07-17 07:33:40
【问题描述】:

我们的测试人员在我们的 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

谁能告诉我这是什么,为什么叫这个?

谢谢。

【问题讨论】:

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


    【解决方案1】:

    看来这条线可能来自RCTInspectorDevServerHelper.mm。你可以看到这条线

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

    getInspectorDeviceUrl 函数中,似乎每次加载应用时都会调用该函数以连接捆绑包。

    【讨论】:

      猜你喜欢
      • 2023-03-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多