Esempio n. 1
0
 public async Task <(JsonRpc.Batch response, string error)> PostAsync(JsonRpc.Batch requests, CancellationToken cancellation)
 {
     try
     {
         return(JsonRpc.Batch.TryParse(await provider.PostAsync(requests, cancellation), out JsonRpc.Batch responses) ? (responses, string.Empty) : (null, "response not parsable"));
     }
     catch (Exception ex)
     {
         return(null, ex.Message);
     }
 }
Esempio n. 2
0
 public async Task <(JsonRpc.Batch response, string error)> PostAsync(JsonRpc.Batch requests)
 {
     return(await PostAsync(requests, CancellationToken.None));
 }