{"id":24271734,"url":"https://github.com/soenneker/soenneker.twilio.restclient","last_synced_at":"2026-06-17T00:02:13.719Z","repository":{"id":224263037,"uuid":"762850699","full_name":"soenneker/soenneker.twilio.restclient","owner":"soenneker","description":"An async thread-safe singleton for a Twilio RestClient","archived":false,"fork":false,"pushed_at":"2026-04-14T12:57:53.000Z","size":2999,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-14T14:34:24.626Z","etag":null,"topics":["async","client","csharp","dotnet","rest","restclient","singleton","twilio","twiliorestclientutil","util"],"latest_commit_sha":null,"homepage":"https://soenneker.com","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/soenneker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","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},"funding":{"github":"soenneker","thanks_dev":"soenneker"}},"created_at":"2024-02-24T21:31:34.000Z","updated_at":"2026-04-14T12:57:58.000Z","dependencies_parsed_at":"2026-01-21T04:00:39.790Z","dependency_job_id":null,"html_url":"https://github.com/soenneker/soenneker.twilio.restclient","commit_stats":null,"previous_names":["soenneker/soenneker.twilio.restclient"],"tags_count":306,"template":false,"template_full_name":null,"purl":"pkg:github/soenneker/soenneker.twilio.restclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.twilio.restclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.twilio.restclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.twilio.restclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.twilio.restclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soenneker","download_url":"https://codeload.github.com/soenneker/soenneker.twilio.restclient/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.twilio.restclient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32069440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"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":["async","client","csharp","dotnet","rest","restclient","singleton","twilio","twiliorestclientutil","util"],"created_at":"2025-01-15T17:59:23.662Z","updated_at":"2026-04-20T23:02:58.019Z","avatar_url":"https://github.com/soenneker.png","language":"C#","funding_links":["https://github.com/sponsors/soenneker","https://thanks.dev/soenneker"],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/nuget/v/soenneker.twilio.restclient.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.twilio.restclient/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.twilio.restclient/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.twilio.restclient/actions/workflows/publish-package.yml)\n[![](https://img.shields.io/nuget/dt/soenneker.twilio.restclient.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.twilio.restclient/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.twilio.restclient/codeql.yml?label=CodeQL\u0026style=for-the-badge)](https://github.com/soenneker/soenneker.twilio.restclient/actions/workflows/codeql.yml)\n\n# ![](https://user-images.githubusercontent.com/4441470/224455560-91ed3ee7-f510-4041-a8d2-3fc093025112.png) Soenneker.Twilio.RestClient\n### An async thread-safe singleton for a Twilio RestClient\n\n## Installation\n\n```\ndotnet add package Soenneker.Twilio.RestClient\n```\n\n## Why?\n\nThis library provides a singleton of a `TwilioRestClient`. \n\nInternally it implements an `HttpClient` singleton. This `HttpClient` has less overhead than new instances of `HttpClient` and `IHttpClientFactory` all while correctly handling connection pooling for DNS changes.\n\nSee [soenneker.utils.httpclientcache](https://github.com/soenneker/soenneker.utils.httpclientcache) for more information.\n\n## Usage\n\n1. Register `ITwilioRestClientUtil` with DI.\n\n```csharp\npublic static async Task Main(string[] args)\n{\n    ...\n    builder.Services.AddTwilioRestClientUtilAsSingleton();\n}\n```\n\n2. Inject `ITwilioRestClientUtil` via constructor, and retrieve a `TwilioRestClient`.\n\n```csharp\npublic class TestClass\n{\n    ITwilioRestClientUtil _twilioRestClientUtil;\n\n    public TestClass(ITwilioRestClientUtil twilioRestClientUtil)\n    {\n        _twilioRestClientUtil = twilioRestClientUtil;\n    }\n\n    public async ValueTask SendMessage()\n    {\n        var message = await MessageResource.CreateAsync(\n            new PhoneNumber(\"+11234567890\"),\n            from: new PhoneNumber(\"+10987654321\"),\n            body: \"Hello World!\",\n            client: await _twilioRestClientUtil.Get()\n        );\n\n        Console.WriteLine(message.Sid);\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.twilio.restclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoenneker%2Fsoenneker.twilio.restclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.twilio.restclient/lists"}