Constructs a new DataService with the option to use an already configured HttpClient. If one is not provided
then the DataService will create one internally. In either case it will be available via the HttpClient property.
Namespace: Breeze.SharpAssembly: Breeze.Sharp (in Breeze.Sharp.dll) Version: 0.6.0.5 (0.6.0.5)
public DataService(
string serviceName,
HttpClient httpClient = null
)
Public Sub New (
serviceName As String,
Optional httpClient As HttpClient = Nothing
)
public:
DataService(
String^ serviceName,
HttpClient^ httpClient = nullptr
)
new :
serviceName : string *
?httpClient : HttpClient
(* Defaults:
let _httpClient = defaultArg httpClient null
*)
-> DataService
Parameters
- serviceName
- Type: SystemString
- httpClient (Optional)
- Type: System.Net.HttpHttpClient
Note that if an HttpClient is passed in that it MUST be a different instance than that provided
to any other DataService. Whether passed in or created by the DataService, the HttpClient will automatically have
its BaseAddress set and will be configured to support for a 'application/json' media type request header.
Reference