From 4d089a7b2e23e3f5f6d4e465da7cc87e1621415e Mon Sep 17 00:00:00 2001 From: Sergey Nechaev <6499856+snechaev@users.noreply.github.com> Date: Wed, 28 Aug 2024 00:56:23 +0200 Subject: [PATCH] Fixed the Simple Factory example. Fixes #2255 --- docs/docs/usage/client.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/usage/client.md b/docs/docs/usage/client.md index 0207c3e25..e84b955f4 100644 --- a/docs/docs/usage/client.md +++ b/docs/docs/usage/client.md @@ -56,7 +56,8 @@ Constructor parameters to configure the `HttpMessageHandler` and default `HttpCl You need to set the `useClientFactory` parameter to `true` in the `RestClient` constructor to enable the factory. ```csharp -var client = new RestClient("https://api.twitter.com/2", true); +var options = new RestClientOptions("https://api.twitter.com/2"); +var client = new RestClient(options, useClientFactory: true); ``` ## Reusing HttpClient