Soenneker.Twilio.RestClient
4.0.2485
Prefix Reserved
dotnet add package Soenneker.Twilio.RestClient --version 4.0.2485
NuGet\Install-Package Soenneker.Twilio.RestClient -Version 4.0.2485
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Twilio.RestClient" Version="4.0.2485" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Twilio.RestClient" Version="4.0.2485" />
<PackageReference Include="Soenneker.Twilio.RestClient" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Twilio.RestClient --version 4.0.2485
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Twilio.RestClient, 4.0.2485"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Twilio.RestClient@4.0.2485
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Twilio.RestClient&version=4.0.2485
#tool nuget:?package=Soenneker.Twilio.RestClient&version=4.0.2485
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Twilio.RestClient
An async thread-safe singleton for a Twilio RestClient
Installation
dotnet add package Soenneker.Twilio.RestClient
Why?
This library provides a singleton of a TwilioRestClient.
Internally 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.
See soenneker.utils.httpclientcache for more information.
Usage
- Register
ITwilioRestClientUtilwith DI.
public static async Task Main(string[] args)
{
...
builder.Services.AddTwilioRestClientUtilAsSingleton();
}
- Inject
ITwilioRestClientUtilvia constructor, and retrieve aTwilioRestClient.
public class TestClass
{
ITwilioRestClientUtil _twilioRestClientUtil;
public TestClass(ITwilioRestClientUtil twilioRestClientUtil)
{
_twilioRestClientUtil = twilioRestClientUtil;
}
public async ValueTask SendMessage()
{
var message = await MessageResource.CreateAsync(
new PhoneNumber("+11234567890"),
from: new PhoneNumber("+10987654321"),
body: "Hello World!",
client: await _twilioRestClientUtil.Get()
);
Console.WriteLine(message.Sid);
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Soenneker.Extensions.Configuration (>= 4.0.767)
- Soenneker.Utils.HttpClientCache (>= 4.0.1848)
- Twilio (>= 7.14.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.2485 | 32 | 2/12/2026 |
| 4.0.2484 | 36 | 2/12/2026 |
| 4.0.2483 | 53 | 2/12/2026 |
| 4.0.2482 | 56 | 2/11/2026 |
| 4.0.2481 | 79 | 2/11/2026 |
| 4.0.2480 | 77 | 2/10/2026 |
| 4.0.2479 | 73 | 2/10/2026 |
| 4.0.2478 | 76 | 2/10/2026 |
| 4.0.2477 | 86 | 2/6/2026 |
| 4.0.2476 | 82 | 2/6/2026 |
| 4.0.2475 | 82 | 2/5/2026 |
| 4.0.2474 | 88 | 2/4/2026 |
| 4.0.2473 | 86 | 2/4/2026 |
| 4.0.2472 | 92 | 1/29/2026 |
| 4.0.2471 | 88 | 1/28/2026 |
| 4.0.2470 | 90 | 1/23/2026 |
| 4.0.2469 | 91 | 1/22/2026 |
| 4.0.2468 | 88 | 1/22/2026 |
| 4.0.2467 | 92 | 1/22/2026 |
| 4.0.2466 | 89 | 1/22/2026 |
Loading failed