{"id":22928071,"url":"https://github.com/ttakahari/aspnetcorecurrentrequestcontext","last_synced_at":"2025-09-01T12:35:54.736Z","repository":{"id":144169796,"uuid":"80436487","full_name":"ttakahari/AspNetCoreCurrentRequestContext","owner":"ttakahari","description":"Enable HttpContext.Current on ASP.NET Core applications.","archived":false,"fork":false,"pushed_at":"2018-06-02T04:22:50.000Z","size":16,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T02:12:57.754Z","etag":null,"topics":["asp-net-core","aspnet-core","aspnetcore","csharp"],"latest_commit_sha":null,"homepage":null,"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/ttakahari.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":"2017-01-30T15:56:33.000Z","updated_at":"2019-07-27T17:19:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"e784ab08-9837-4aa8-a618-e0ed1285f9b2","html_url":"https://github.com/ttakahari/AspNetCoreCurrentRequestContext","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ttakahari/AspNetCoreCurrentRequestContext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FAspNetCoreCurrentRequestContext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FAspNetCoreCurrentRequestContext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FAspNetCoreCurrentRequestContext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FAspNetCoreCurrentRequestContext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttakahari","download_url":"https://codeload.github.com/ttakahari/AspNetCoreCurrentRequestContext/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FAspNetCoreCurrentRequestContext/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265686610,"owners_count":23811209,"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":["asp-net-core","aspnet-core","aspnetcore","csharp"],"created_at":"2024-12-14T09:17:16.311Z","updated_at":"2025-07-18T01:04:05.520Z","avatar_url":"https://github.com/ttakahari.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AspNetCoreCurrentRequestContext\n\nEnable to use HttpContext.Current on ASP.NET Core applications.\n\n[![AppVeyor](https://img.shields.io/appveyor/ci/gruntjs/grunt.svg?style=plastic)](https://ci.appveyor.com/project/ttakahari/AspNetCoreCurrentRequestContext)\n[![NuGet](https://img.shields.io/nuget/v/AspNetCoreCurrentRequestContext.svg?style=plastic)](https://www.nuget.org/packages/AspNetCoreCurrentRequestContext/)\n\n## Install\n\nfrom NuGet - [AspNetCoreCurrentRequestContext](https://www.nuget.org/packages/AspNetCoreCurrentRequestContext/)\n\n```ps1\nPM \u003e Install-Package AspNetCoreCurrentRequestContext\n```\n\n## How to use\n\nAt first, you have to add ```CurrentRequestContextMiddleware``` to ```IApplicationBuilder``` on ```Configure``` method in ```Startup``` class.\n\nYou can use the extension-method that is ```UseCurrentRequestContext``` for doing that.\n\n```csharp\npublic class Startup\n{\n    public void Configure(IApplicationBuilder app)\n    {\n        // add CurrentRequestContextMiddleware.\n        app.UseCurrentRequestContext();\n    }\n}\n```\n\nAfter that, if you call ```AspNetCoreHttpContext.Current``` like ```HttpContext.Current``` on ASP.NET applications, you can use ```HttpContext``` everywhere.\n\n```csharp\n// you can get HttpContext in the current request.\nvar context = AspNetCoreHttpContext.Current;\n```\n\n## Lisence\n\nunder [MIT Lisence](https://opensource.org/licenses/MIT).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttakahari%2Faspnetcorecurrentrequestcontext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttakahari%2Faspnetcorecurrentrequestcontext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttakahari%2Faspnetcorecurrentrequestcontext/lists"}