Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Simple factory docs sample can not be compiled #2255

Closed
snechaev opened this issue Aug 27, 2024 · 0 comments · Fixed by #2256
Closed

[Docs] Simple factory docs sample can not be compiled #2255

snechaev opened this issue Aug 27, 2024 · 0 comments · Fixed by #2256
Labels

Comments

@snechaev
Copy link
Contributor

Describe the bug
Docs link: https://restsharp.dev/docs/usage/client#simple-factory
Src link:

var client = new RestClient("https://api.twitter.com/2", true);

The code from the docs var client = new RestClient("https://api.twitter.com/2", true); can not be compiled because there is no appropriate constructor for this parameters set.

To Reproduce
Copy code from the docs (var client = new RestClient("https://api.twitter.com/2", true);), try to compile.

Expected behavior
The code compiles without errors.

Stack trace
No stack trace, build error.
Error CS1503 : Argument 2: cannot convert from "bool" to "RestSharp.ConfigureHeaders?".

Desktop (please complete the following information):

  • OS: macos 14.6.1
  • .NET version: net8
  • Version 111.4.1

Additional context
There are several constructor overloads with the useClientFactory parameter, but I can't say for sure which is the best one to show as an example in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant