Skip to content

Commit 79c79ae

Browse files
committed
Sync open source content 🐝 (from f9404e08d4c33c46f07d8e4ef91d888fbdeae25d)
1 parent 66a97d7 commit 79c79ae

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

docs/customize/runtime/custom-http-client.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,21 @@ SDK sdk = builder.build();
107107
```
108108

109109
```csharp !!tabs C#
110-
/* YourHttpClient must implement the ISpeakeasyHttpClient interface */
111-
110+
//----------------------------------------------------
111+
// <summary>
112+
// The C# SDK accepts a client that implements
113+
// the `Utils.IDefaultHttpClient` interface.
114+
//
115+
// Note: In some SDKs this interface may be called
116+
// `ISpeakeasyHttpClient`, which can be rebranded
117+
// as `I<Prefix>HttpClient` by configuring the
118+
// `httpClientPrefix` setting in your `gen.yaml`.
119+
// </summary>
120+
//----------------------------------------------------
121+
122+
// YourHttpClient must implement Utils.IDefaultHttpClient
112123
var httpClient = new YourHttpClient();
124+
113125
// Initialize the SDK with the custom HTTP client
114126
var sdk = new SDK(client: httpClient);
115127
```

docs/languages/csharp/methodology-csharp.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ The SDK includes minimal dependencies. The only external dependencies are:
6161

6262
## HTTP Client
6363

64-
By default, the C# SDK will instantiate its own `SpeakeasyHttpClient`, which uses the `System.Net.HttpClient` under the hood. The default client can be overridden by passing a custom HTTP client when initializing the SDK:
64+
By default, the C# SDK will instantiate its own `DefaultHttpClient`, which uses the `System.Net.HttpClient` under the hood. The default client can be overridden by passing a custom HTTP client when initializing the SDK:
6565
```csharp
6666
var sdk = new SDK(client: new CustomHttpClient());
6767
```
6868

69-
The provided HTTP client must implement the `ISpeakeasyHttpClient` interface as defined in `Utils.SpeakeasyHttpClient.cs`:
69+
The provided HTTP client must implement the `Utils.IDefaultHttpClient` interface:
7070
```csharp
7171
using <NameSpace>.Utils;
7272

73-
public class CustomHttpClient : ISpeakeasyHttpClient
73+
public class CustomHttpClient : IDefaultHttpClient
7474
{
7575
public CustomHttpClient()
7676
{
@@ -105,13 +105,13 @@ public class CustomHttpClient : ISpeakeasyHttpClient
105105

106106
This is useful if you're using a custom HTTP client that supports proxy settings or other custom configuration.
107107

108-
In the example below, a custom client inherits from the internal `SpeakeasyHttpClient` class, which implements the `ISpekeasyHttpClient` interface. This client adds a header to all requests before sending them:
108+
In the example below, a custom client inherits from the internal `DefaultHttpClient` class, which implements the `IDefaultHttpClient` interface. This client adds a header to all requests before sending them:
109109
```csharp
110110
using <NameSpace>.Utils;
111111

112-
internal class CustomSpeakeasyHttpClient : SpeakeasyHttpClient
112+
internal class CustomHttpClient : DefaultHttpClient
113113
{
114-
public CustomSpeakeasyHttpClient() {}
114+
public CustomHttpClient() {}
115115

116116
public override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request)
117117
{

docs/languages/maturity.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Feature support levels indicate the extent of additional functionalities provide
3737
{ target: "[Terraform](/docs/create-terraform)", maturity: "GA", support: "Level 2" },
3838
{ target: "[PHP](/docs/languages/php/methodology-php)", maturity: "GA", support: "Level 1" },
3939
{ target: "[Unity](/docs/languages/unity/methodology-unity)", maturity: "Beta", support: "Level 1" },
40-
{ target: "[Ruby](/docs/languages/ruby/methodology-ruby)", maturity: "Alpha", support: "Level 1" },
40+
{ target: "[Ruby](/docs/languages/ruby/methodology-ruby)", maturity: "Beta", support: "Level 1" },
4141
{ target: "Postman", maturity: "Alpha", support: "Level 1" }
4242
]}
4343
columns={[

0 commit comments

Comments
 (0)