public SimpleRpcClient(Uri baseUrl, HttpClient httpClient, JsonSerializerSettings jsonSerializerSettings = null) { if (jsonSerializerSettings == null) { jsonSerializerSettings = DefaultJsonSerializerSettingsFactory.BuildDefaultJsonSerializerSettings(); } _jsonSerializerSettings = jsonSerializerSettings; _httpClient = httpClient; _httpClient.BaseAddress = baseUrl; }
public RpcClient(Uri baseUrl, AuthenticationHeaderValue authHeaderValue = null, JsonSerializerSettings jsonSerializerSettings = null, HttpClientHandler httpClientHandler = null, ILog log = null) { _baseUrl = baseUrl; _authHeaderValue = authHeaderValue; if (jsonSerializerSettings == null) { jsonSerializerSettings = DefaultJsonSerializerSettingsFactory.BuildDefaultJsonSerializerSettings(); } _jsonSerializerSettings = jsonSerializerSettings; _httpClientHandler = httpClientHandler; _log = log; CreateNewHttpClient(); }