As of 0.5.4 check-in, the Breeze.Sharp/DataService.cs::InitializeHttpClient
method creates an HttpClient
with the default constructor. My intranet breeze web api service has a .Net console application, which needs to be authenticated by the service using Windows authentication. In a pre-breeze universe, I would have created an HttpClient
object that takes the following HttpClientHandler
in the constructor, which would then send the user's credentials along with the http request:
HttpClientHandler handler = new HttpClientHandler()
{
UseDefaultCredentials = true
};
So the request here is to be able inject my own HttpClient
into the DataService
, or otherwise specify this setting when I construct an EntityManager
.
For now, I have resolved the issue by modifying my own instance of the Breeze.Sharp library by updating the DataService
constructor to optionally take in an HttpClientHandler
, like so:
public DataService(String serviceName, HttpClientHandler handler = null) { ... }
I would prefer to keep using the main library so hopefully this issue gets tracked and resolved for everyone else. :)