How can I view network requests (for debugging) in React Native?

前端 未结 12 1163
借酒劲吻你
借酒劲吻你 2020-11-28 03:16

I\'d like to view my network requests in React Native to help me debug - ideally in the \'Network\' tab of Chrome\'s devtools.

There are some closed issues about thi

12条回答
  •  感情败类
    2020-11-28 03:35

    In the past I used GLOBAL.XMLHttpRequest hack to track my API requests but sometimes it is very slow and didn't work for assets requests. I decided to use Postman’s proxy feature to inspect HTTP communication going out from phone. For details look at the official documentation, but basically, there are three easy steps:

    • Set up the proxy in Postman
    • Check your computer’s IP address($ ifconfig)
    • Configure HTTP proxy on your mobile device in wifi settings

提交回复
热议问题