private (string response, bool isSuccess) SendTransaction(Transaction transaction, IHttpRequestService httpRequestService, NodeData nodeData) { var response = string.Empty; var success = false; var data = JsonConvert.SerializeObject(transaction); foreach (var nodeUrl in nodeData.Url) { var fullUrl = nodeUrl + nodeData.Endpoints.PushTransaction; (response, success) = httpRequestService.SendRequest(fullUrl, data, "POST"); if (success) { break; } } return(response, success); }
public async Task <ActionConfirmation <KvProperty> > AddKvPropertyAsync(KvProperty kvProperty) { return(await _httpRequestService.SendRequest <KvProperty>(HttpMethod.Post, KvPropertiesEndpointPath, kvProperty)); }