Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ailtonvivaz/react-native-beagle/llms.txt
Use this file to discover all available pages before exploring further.
NetworkingLog extends BeagleLog to provide specialized handling for network requests and responses. It automatically tracks request details, response status, and sets appropriate log levels based on HTTP status codes.
Properties
Inherits all properties fromBeagleLog, plus:
The full URL of the network request.
The hostname extracted from the URL (e.g.,
api.example.com).The request details including method, URL, headers, and body.
Optional response details. Present when the request has completed.
Constructor
The network request object containing URL, method, headers, and body.
Optional response object. If provided, determines the log level based on status code.
Optional custom ID for the log entry.
- Extracts host and path from the request URL
- Sets message to
{METHOD} {path}(e.g.,GET /api/users) - If response is provided:
- Sets level to
'error'for status >= 400 or kind === ‘error’ - Sets level to
'warning'for status 300-399 - Sets level to
'success'for status < 300
- Sets level to
- If no response, sets level to
'loading'
Methods
filter()
Overrides the basefilter() method to search both message and host.
The search query to filter by.
boolean - true if the query matches the message or host (case-insensitive).
Type Definitions
NetworkingRequest
NetworkingResponse
NetworkingHeaders
How It’s Used Automatically
When you enable the Networking plugin, React Native Beagle automatically intercepts network requests and createsNetworkingLog entries:
- Request starts: A log is created with
'loading'level - Response received: The log is updated with response data and appropriate level
- Error occurs: The log level becomes
'error'
NetworkingLog instances manually.
Log Structure Examples
These examples show the structure ofNetworkingLog instances as they appear in your Beagle inspector. Network logs are created automatically - you don’t create them manually.