{"id":49950758,"url":"https://github.com/imsankalp/react-native-network-tools","last_synced_at":"2026-05-17T19:09:42.724Z","repository":{"id":323283617,"uuid":"1092317175","full_name":"imsankalp/react-native-network-tools","owner":"imsankalp","description":"A developer tool to inspect network requests in react native application","archived":false,"fork":false,"pushed_at":"2026-03-17T05:51:28.000Z","size":22731,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-17T17:08:52.835Z","etag":null,"topics":["developer-tools","expo","react-native","tanstack-query"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imsankalp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-08T12:00:25.000Z","updated_at":"2026-03-17T04:57:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/imsankalp/react-native-network-tools","commit_stats":null,"previous_names":["imsankalp/react-native-network-tools"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/imsankalp/react-native-network-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsankalp%2Freact-native-network-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsankalp%2Freact-native-network-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsankalp%2Freact-native-network-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsankalp%2Freact-native-network-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imsankalp","download_url":"https://codeload.github.com/imsankalp/react-native-network-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsankalp%2Freact-native-network-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33151626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","expo","react-native","tanstack-query"],"created_at":"2026-05-17T19:09:40.837Z","updated_at":"2026-05-17T19:09:42.715Z","avatar_url":"https://github.com/imsankalp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-network-tools\n\nA powerful React Native library that allows you to track and inspect all network requests in your app. Perfect for debugging, monitoring, and understanding your app's network behavior.\n\n## Features\n\n- 🔍 **Automatic Request Tracking**: Captures all OkHttp network requests automatically\n- 🐛 **Debug-Only**: Zero overhead in production builds (only active in debug mode)\n- 📊 **Detailed Information**: Captures request/response headers, bodies, timing, and errors\n- 💾 **In-Memory Storage**: Stores up to 100 recent requests with automatic cleanup\n- 🔒 **Thread-Safe**: Built with concurrent data structures for reliability\n- ⚡ **Easy Integration**: Simple API with minimal setup required\n\n![](Screen_recording_20260204_002905.mp4)\n\n## Installation\n\n```sh\nnpm install react-native-network-tools\n# or\nyarn add react-native-network-tools\n```\n\nIf you use Expo Development Builds, add the plugin to `app.json`:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\"react-native-network-tools\"]\n  }\n}\n```\n\n## Quick Start\n\n### 1. Configure OkHttpClient (Android)\n\nAdd the interceptor to your `MainApplication.kt`:\n\n```kotlin\nimport com.networktools.NetworkToolsManager\nimport okhttp3.OkHttpClient\n\nclass MainApplication : Application(), ReactApplication {\n\n\n  override fun onCreate() {\n    super.onCreate()\n\n    NetworkingModule.setCustomClientBuilder(\n      object : NetworkingModule.CustomClientBuilder {\n        override fun apply(builder: OkHttpClient.Builder) {\n          NetworkToolsManager.addInterceptor(builder)\n        }\n      }\n    )\n\n    // rest code\n  }\n}\n```\n\n### 2. Wrap Your App with NetworkMonitorProvider\n\n```typescript\nimport { NetworkMonitorProvider } from 'react-native-network-tools';\n\nfunction App() {\n  return (\n    \u003cNetworkMonitorProvider\n      maxRequests={1000}\n      showFloatingMonitor={true}\n    \u003e\n      {/* Your app code */}\n    \u003c/NetworkMonitorProvider\u003e\n  );\n}\n```\n\n### 3. View Network Requests\n\n```typescript\nimport * as NetworkTools from 'react-native-network-tools';\n\n// Get all requests\nconst requests = NetworkTools.getAllRequests();\n\n// Get specific request\nconst request = NetworkTools.getRequestById('request-id');\n\n// Clear all requests\nNetworkTools.clearAllRequests();\n\n// Get request count\nconst count = NetworkTools.getRequestCount();\n```\n\n## API Reference\n\n### `getAllRequests(): NetworkRequest[]`\nGet all captured network requests.\n\n### `getRequestById(id: string): NetworkRequest | null`\nGet a specific network request by its unique ID.\n\n### `clearAllRequests(): void`\nClear all stored network requests from memory.\n\n### `getRequestCount(): number`\nGet the total count of stored network requests.\n\n### `isNativeNetworkToolsAvailable(): boolean`\nDetect if the native module is available at runtime.\n\n### `getNetworkToolsRuntime(): 'turbo' | 'legacy' | 'unavailable'`\nDetect whether the module is running over TurboModule, legacy bridge, or is unavailable.\n\n## NetworkRequest Type\n\n```typescript\ninterface NetworkRequest {\n  id: string;\n  url: string;\n  method: string;\n  requestHeaders: Record\u003cstring, string\u003e;\n  requestBody?: string;\n  requestTime: number;\n  responseCode?: number;\n  responseHeaders?: Record\u003cstring, string\u003e;\n  responseBody?: string;\n  responseTime?: number;\n  duration?: number;\n  error?: string;\n}\n```\n\n## Build Configuration\n\nThe library automatically enables tracking only in debug builds. You can customize this behavior:\n\n```gradle\nbuildTypes {\n  debug {\n    buildConfigField \"boolean\", \"NETWORK_TOOLS_ENABLED\", \"true\"\n  }\n  staging {\n    buildConfigField \"boolean\", \"NETWORK_TOOLS_ENABLED\", \"true\"\n  }\n  release {\n    buildConfigField \"boolean\", \"NETWORK_TOOLS_ENABLED\", \"false\"\n  }\n}\n```\n\n## Advanced Usage\n\nFor detailed setup instructions, custom configurations, and advanced usage patterns, see the [Setup Guide](docs/SETUP_GUIDE.md).\nFor Expo validation, see the [Expo smoke test](docs/EXPO_SMOKE_TEST.md).\n\n## Platform Support\n\n| Platform / Runtime | Status | Notes |\n| --- | --- | --- |\n| React Native Android (New Architecture) | ✅ Supported | TurboModule path |\n| React Native Android (Old Architecture) | ✅ Supported | Legacy bridge fallback |\n| Expo Development Build + Prebuild (Android) | ✅ Supported | Use config plugin |\n| Expo Go | ❌ Not supported | Native interception requires a dev build |\n| iOS | 🚧 In progress | Not yet implemented end-to-end |\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimsankalp%2Freact-native-network-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimsankalp%2Freact-native-network-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimsankalp%2Freact-native-network-tools/lists"}