public new async Task <blockChainInfo_ticker> AsyncFetch() { UriBuilder uriBuilder = new UriBuilder(HttpRequestMessage.RequestUri); HttpRequestMessage.RequestUri = uriBuilder.Uri; var httpResponseMessage = await SingletonHttpClient.AsyncFetch(Policy, HttpRequestMessage); var data = await httpResponseMessage.Content.ReadAsStringAsync(); return(string.IsNullOrEmpty(data) ? default(blockChainInfo_ticker) : JsonConvert.DeserializeObject <blockChainInfo_ticker>(data)); }
public override async Task <chain_so_api_v2_get_info_Data> AsyncFetch(string coin) { UriBuilder uriBuilder = new UriBuilder(HttpRequestMessage.RequestUri); uriBuilder.Path += coin; HttpRequestMessage.RequestUri = uriBuilder.Uri; //var httpResponseMessage = await SingletonHttpClient.PostAsync(Policy, HttpRequestMessage); var httpResponseMessage = await Policies.PolicyWrap.Execute(ct => SingletonHttpClient.AsyncFetch(HttpRequestMessage.RequestUri, HttpRequestMessage)); var data = await httpResponseMessage.Content.ReadAsStringAsync(); return(string.IsNullOrEmpty(data) ? default(chain_so_api_v2_get_info_Data) : JsonConvert.DeserializeObject <chain_so_api_v2_get_info_Data>(data)); }