public async Task Execute() { try { await TargetUrl .AppendPathSegment(MemberId) .DeleteAsync(); } catch (FlurlHttpException e) { throw e.ProcessException(); } }
public async Task <IClusterMember> Execute() { var values = new FormBodyBuilder() .Add(Constants.Etcd.Parameter_PeerURLs, Uris.Select(x => x.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped)).ToArray()) .Build(); try { return(await TargetUrl .AppendPathSegment(MemberId) .PutJsonAsync(values) .ReceiveJson <ClusterMember>()); } catch (FlurlHttpException e) { throw e.ProcessException(); } }