You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it doesn't work for all derived record classes of Parameter because each record class creates its own override of ToString() hiding the one from the base class.
A possible solution here might be adding sealed modifier to stop the compiler from synthesizing new overrides:
Ok I sealed the ToString() but also added an extension for IRestClient to get the query string. It's called GetRequestQuery. It also considers default query parameters and does all the necessary encodings.
Describe the bug
After upgrading from version 106 to 109 I noticed some of our logic is broken.
We are using an expression to build query strings like
which calls
ToString()
method for each parameter object, and we should get the resulting string likeparam1=value1¶m2=value2
.Even though there is already a proper override in the base abstract class
RestSharp/src/RestSharp/Parameters/Parameter.cs
Line 30 in 205d170
it doesn't work for all derived record classes of
Parameter
because each record class creates its own override ofToString()
hiding the one from the base class.A possible solution here might be adding
sealed
modifier to stop the compiler from synthesizing new overrides:To Reproduce
The text was updated successfully, but these errors were encountered: