Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get_baseUrl RestSharp error

I just downloaded DropNet to try and use it. I am getting an exception when trying to do new DropNetClient:

Method not found: System.String RestSharp.RestClient.get_BaseUrl()

I searched this on Google and found that RestSharp may have introduced this error and it suggested to update to 105 for RestSharp but that did not solve things.

Is this a known error and how do I correct it from happening?

like image 455
Matt Nieland Avatar asked Jan 24 '26 20:01

Matt Nieland


1 Answers

This is due to a change in RestSharp that converted the BaseUrl property from a string to a URI.

DropNet needs to update their references & rebuild in order to support 105. This is the change that broke them... https://github.com/restsharp/RestSharp/commit/b15ee7f60b695e0578b6def7a3e1279b62d6fccd

From https://github.com/restsharp/RestSharp/releases/tag/105.0:

New Features/Improvements

  • Converted the BaseUrl to be a URI rather than a string (potential breaking change)
  • Updated the SimpleJson package to the latest version (potential breaking change)
  • Converted the use of tabs to spaces
  • Added support for the DeserializeAs attribute on XML Added ability to deserialize into structs
  • Added additional methods on RestRequest
    • IRestRequest.AddJsonBody
    • IRestRequest.AddXmlBody
    • IRestRequest.AddQueryParameter
  • Added support for multi-part form request to allow both a request body and files

Bug Fixes

Fixed potential Null Reference Exceptions on the parameters in RestClient (ToString usage)

If you get Nuget package http://www.nuget.org/packages/RestSharp/104.5.0, then you should be okay...

like image 149
jt000 Avatar answered Jan 26 '26 23:01

jt000



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!