Skip to content
English

Network

The Network panel lists every HTTP request your app makes, with its headers, payload, response and cookies. You can filter the list, copy a request as a cURL command, and throttle your app’s network to test slow and offline connections.

Using Network in the desktop app

Accepts boolean | NetworkPluginConfig On by default
NetworkPluginConfig
OptionTypeDefaultDescription
ignoreUrls(string | RegExp)[][]Requests whose URL matches one of these strings or patterns are left out of the Network panel.

From React Native 0.83, the desktop app reads your app’s requests through Metro, so they show even before init() runs. Throttling and ignored URLs need init().

List the URLs you never want to see, such as health checks or analytics:

import { init } from '@xerlock/client';
init({
network: {
ignoreUrls: ['/health', /analytics/],
},
});

A string matches if it appears anywhere in the request’s full URL, and is case-sensitive. A regular expression is tested against the full URL, with its flags. Change the list and run init() again to update requests already shown.

Pass false to hide the Network panel for this app and turn throttling off:

import { init } from '@xerlock/client';
init({ network: false });