public string Post([FromBody] string value) { var config = JsonConvert.DeserializeObject <Config>(File.ReadAllText("config.json")); var content = SkyNet.Copy($"{config.SkynetUrlPost}", "clipboard", value); foreach (var peer in config.Peers) { var client = new RestClient($"{peer}/api/clipboard") { UserAgent = "Sia-Agent" }; var request = new RestRequest() { Method = Method.PUT, RequestFormat = DataFormat.Json }; request.AddJsonBody(content); var asd = client.Execute(request); } return(content); }
public void TestMethod1() { var content = SkyNet.Copy("https://siasky.net/skynet/skyfile/", "clipboard", @"C:\Users\Khanimamba\Desktop\Cake\New folder\Example.txt"); SkyNet.Paste("https://siasky.net/", content); }