{"id":15823727,"url":"https://github.com/stefh/ihttpclient","last_synced_at":"2025-04-07T10:38:48.999Z","repository":{"id":211428004,"uuid":"729097547","full_name":"StefH/IHttpClient","owner":"StefH","description":"This project uses source generation to generate an IHttpClient interface and HttpClientProxy from the HttpClient to make it injectable and unit-testable.","archived":false,"fork":false,"pushed_at":"2024-04-29T11:54:10.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-22T22:20:31.506Z","etag":null,"topics":[],"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/StefH.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":"2023-12-08T12:06:01.000Z","updated_at":"2024-04-29T12:40:40.000Z","dependencies_parsed_at":"2024-04-28T12:32:19.818Z","dependency_job_id":"eb65a926-b777-408f-a06e-8f87949635bb","html_url":"https://github.com/StefH/IHttpClient","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.15384615384615385","last_synced_commit":"758f8d19643e1cd32a29b2c955ad381a715e904a"},"previous_names":["stefh/ihttpclient"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FIHttpClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FIHttpClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FIHttpClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FIHttpClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefH","download_url":"https://codeload.github.com/StefH/IHttpClient/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640185,"owners_count":20971549,"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-10-05T08:22:23.273Z","updated_at":"2025-04-07T10:38:48.981Z","avatar_url":"https://github.com/StefH.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ⏩ Moved\nThis project is now archived and moved to [StefH/Interfaces](https://github.com/StefH/Interfaces).\n\n---\n\n## Info\nThis project uses source generation to generate an `IHttpClient` interface and `HttpClientProxy` from the `HttpClient` to make it injectable and unit-testable.\n\nAll the methods and properties from the `HttpClient` are replicated to `IHttpClient`.\n\n## NuGet\n[![NuGet Badge](https://img.shields.io/nuget/v/IHttpClient)](https://www.nuget.org/packages/IHttpClient)\n\n## Usage\n``` c#\nHttpClient httpClient = new HttpClient();\nIHttpClient httpClientProxy = new HttpClientProxy(httpClient); \n\nvar result = await httpClientProxy.GetAsync(\"https://www.google.nl\");\nvar todo = await httpClientProxy.GetFromJsonAsync\u003cTodo\u003e(\"https://jsonplaceholder.typicode.com/todos/1\");\nvar postResult = await httpClientProxy.PostAsJsonAsync(\"https://jsonplaceholder.typicode.com/todos\", new Todo { Id = 123 });\nvar patchResult = await httpClientProxy.PatchAsJsonAsync(\"https://jsonplaceholder.typicode.com/todos/1\", new Todo { Id = 400 });\nvar putResult = await httpClientProxy.PutAsJsonAsync(\"https://jsonplaceholder.typicode.com/todos/1\", new Todo { Id = 444 });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fihttpclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefh%2Fihttpclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fihttpclient/lists"}