How can one Dispose() a Refit connection made w/ RestService.For<IRestInterface>

50 Views Asked by At

I am creating an interface for a REST API using Refit as follows:

var settingsXml = new RefitSettings
{
    ContentSerializer = new XmlContentSerializer(new XmlContentSerializerSettings())
};
this.api = RestService.For<IRestInterface>(baseUrl, settingsXml);

Inside RestService.For() an HttpClient is created, How can I dispose this?

0

There are 0 best solutions below