Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Restclient' does not contain a 'BaseUrl' Error

Tags:

asp.net-core

I am working on Asp.net core project. trying to send mail using mailgun. used mailgun C# code given in https://documentation.mailgun.com/en/latest/user_manual.html#sending-via-api But getting an error "RestClient" does not contain a "BaseUrl" error.

like image 535
Rohini Patil Avatar asked Oct 19 '25 08:10

Rohini Patil


1 Answers

Since version 107+, RestSharp moved certain properties which cause 'Cannot resolve symbol '.BaseUrl' for example when accessing this. See a list here: https://restsharp.dev/v107/#reference

To access BaseUrl property of your RestClient you can do the following:

var client = new RestClient("yourBaseUrl", options);
var baseUrl = client.Options.BaseUrl;
like image 121
Hendrik Clercx Avatar answered Oct 22 '25 06:10

Hendrik Clercx



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!