{"id":13431941,"url":"https://github.com/mayuki/Rin","last_synced_at":"2025-03-16T22:32:52.605Z","repository":{"id":33246274,"uuid":"143168207","full_name":"mayuki/Rin","owner":"mayuki","description":"Request/response Inspector middleware for ASP.NET Core","archived":false,"fork":false,"pushed_at":"2024-02-03T15:49:51.000Z","size":4931,"stargazers_count":644,"open_issues_count":12,"forks_count":24,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-11T09:55:03.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","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/mayuki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2018-08-01T14:36:05.000Z","updated_at":"2024-09-29T04:07:12.000Z","dependencies_parsed_at":"2024-06-18T15:32:27.558Z","dependency_job_id":"aa1d01ac-abc8-4c74-8e12-7799ee980b31","html_url":"https://github.com/mayuki/Rin","commit_stats":{"total_commits":293,"total_committers":5,"mean_commits":58.6,"dds":0.04436860068259385,"last_synced_commit":"5e33a7246122c7e7595fa17e6cd16190f57e37cc"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayuki%2FRin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayuki%2FRin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayuki%2FRin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayuki%2FRin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayuki","download_url":"https://codeload.github.com/mayuki/Rin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243944953,"owners_count":20372885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-31T02:01:07.222Z","updated_at":"2025-03-16T22:32:52.030Z","avatar_url":"https://github.com/mayuki.png","language":"C#","funding_links":[],"categories":["Frameworks, Libraries and Tools","C\\#","others","C#","Observability (Metrics + Logs + Traces)","框架, 库和工具"],"sub_categories":["Tools","工具"],"readme":"# \u003cimg src=\"docs/images/logo.svg\" alt=\"\" width=\"32\" /\u003e Rin\n**R**equest/response **In**spector middleware for ASP.NET Core. like Glimpse.\n\n[![Build-Release](https://github.com/mayuki/Rin/workflows/Build-Release/badge.svg)](https://github.com/mayuki/Rin/actions?query=workflow%3ABuild-Release)\n[![Build-Development](https://github.com/mayuki/Rin/workflows/Build-Development/badge.svg)](https://github.com/mayuki/Rin/actions?query=workflow%3ABuild-Development)\n[![NuGet version](https://badge.fury.io/nu/Rin.svg)](https://badge.fury.io/nu/Rin)\n\nRin captures HTTP requests to ASP.NET Core app and provides viewer for captured data. It's useful tool to debug your Web application (e.g. Web sites, API apps).\n\n![](docs/images/Demo-01.gif)\n\n# ✅ Features\n## Capture requests and responses\nRin captures HTTP traffics between the ASP.NET Core app and any clients.\n\n- Headers + Body\n- Traces (`Microsoft.Extensions.Logging.ILogger`, log4net, ...)\n- Unhandled Exception\n\n## Inspect from Web browser in realtime\n\n### View events timeline\nRin inspector displays events that occurred while processing a request.\n\n![](docs/images/Screenshot-02.png)\n\n### Preview a request/response body\nRin inspector can display request and response body with a preview. (e.g. JSON, Image, HTML, JavaScript ...)\n\n![](docs/images/Screenshot-03.png)\n\n### View related trace logs\nRin captures a request and response. Also, it captures logs while processing a request.\n\n- Built-in `Microsoft.Extensions.Logging.ILogger` integration\n- log4net Appender\n\n### Save and export request/response\nYou can replay a request easily using cURL and LINQPad.\n\n- Save request/response body\n- Copy request as cURL and C#\n\n### Integrate with ASP.NET Core MVC\n- Record timings of view rendering and action execution\n- In-View Inspector (like MiniProfiler)\n\n![](docs/images/Screenshot-04.png)\n\n# 📝 Requirements\n- .NET Core 3.1+\n- ASP.NET Core 3.1+\n- Modern browser (e.g. Microsoft Edge, Google Chrome, Firefox, Safari...)\n    - WebSocket connectivity\n\n# ⚡ QuickStart\n\n## Install NuGet Package\n### Using Visual Studio\n`Dependencies` -\u003e `Manage NuGet Packages...` -\u003e Search and install `Rin` and `Rin.Mvc` (if your project is built with ASP.NET Core MVC) package.\n\n### Using dotnet command\n```\ndotnet add package Rin\ndotnet add package Rin.Mvc\n```\n\n### Using Package Manager\n```\nInstall-Package Rin\nInstall-Package Rin.Mvc\n```\n\n## Setup and configure Rin\n\n### Program.cs\n```csharp\npublic static IWebHostBuilder CreateWebHostBuilder(string[] args) =\u003e\n    WebHost.CreateDefaultBuilder(args)\n        .ConfigureLogging(configure =\u003e\n        {\n            // Add: Enable Rin Logger\n            configure.AddRinLogger();\n        })\n        .UseStartup\u003cStartup\u003e();\n```\n\n### Startup.cs\n\n```csharp\npublic class Startup\n{\n    ...\n    public void ConfigureServices(IServiceCollection services)\n    {\n        ...\n        services.AddControllersWithViews()\n            // Add(option): Enable ASP.NET Core MVC support if the project built with ASP.NET Core MVC\n            .AddRinMvcSupport();        \n\n        // Add: Register Rin services\n        services.AddRin();\n    }\n    ...\n    public void Configure(IApplicationBuilder app, IHostingEnvironment env)\n    {\n        if (env.IsDevelopment())\n        {\n            // Add: Enable request/response recording and serve a inspector frontend.\n            // Important: `UseRin` (Middlewares) must be top of the HTTP pipeline.\n            app.UseRin();\n\n            // Add(option): Enable ASP.NET Core MVC support if the project built with ASP.NET Core MVC\n            app.UseRinMvcSupport();\n\n            app.UseDeveloperExceptionPage();\n\n            // Add: Enable Exception recorder. this handler must be after `UseDeveloperExceptionPage`.\n            app.UseRinDiagnosticsHandler();\n        }\n        ...\n    }\n}\n```\n\n### _Layout.cshtml (for ASP.NET Core MVC)\n```cshtml\n@inject Rin.Mvc.View.RinHelperService RinHelper\n...\n    \u003cenvironment include=\"Development\"\u003e\n        \u003clink rel=\"stylesheet\" href=\"~/lib/bootstrap/dist/css/bootstrap.css\" /\u003e\n        \u003clink rel=\"stylesheet\" href=\"~/css/site.css\" /\u003e\n        @* Add: Enable In-View Inspector for ASP.NET Core MVC *@\n        @RinHelper.RenderInViewInspector()\n    \u003c/environment\u003e\n...\n```\n\n## Start the application and open Inspector on the web\n\nLaunch the app, then open `http://[Host:Port]/rin/` in the browser, you can see Rin Inspector now.\n\n# 🔨 Develop and build Rin Inspector (client side)\nRin Inspector (client side) codes is separated from Rin core C# project. If you want to develop Rin (C#) or launch a sample project, you need to build and deploy the artifacts.\n\n## [Rin.Frontend, Rin.Mvc.Frontend] Setup and start the development server\n- `yarn`\n- `yarn start`\n\n## [Rin.Frontend] Build Rin/Resources.zip\n- `yarn build`\n- `yarn pack`\n\n## [Rin.Mvc.Frontend] Build Rin.Mvc/EmbeddedResources\n- `yarn build`\n- `copy .\\dist\\static\\main.js* ..\\Rin.Mvc\\EmbeddedResources\\`\n\n# License\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayuki%2FRin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayuki%2FRin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayuki%2FRin/lists"}