public override void ResetSeed() { HttpWebRequest betrequest = (HttpWebRequest)HttpWebRequest.Create("https://api.moneypot.com/v1/hashes?access_token=" + token); if (Prox != null) { betrequest.Proxy = Prox; } betrequest.Method = "POST"; string post = "access_token=" + token; betrequest.ContentLength = post.Length; betrequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"; using (var writer = new StreamWriter(betrequest.GetRequestStream())) { writer.Write(post); } HttpWebResponse EmitResponse2 = (HttpWebResponse)betrequest.GetResponse(); string sEmitResponse2 = new StreamReader(EmitResponse2.GetResponseStream()).ReadToEnd(); MPSeed tmp = json.JsonDeserialize <MPSeed>(sEmitResponse2); next = tmp.hash; }
public override void ResetSeed() { List <KeyValuePair <string, string> > pairs = new List <KeyValuePair <string, string> >(); pairs.Add(new KeyValuePair <string, string>("access_token", token)); FormUrlEncodedContent Content = new FormUrlEncodedContent(pairs); string res = Client.PostAsync("hashes?access_token=" + token, Content).Result.Content.ReadAsStringAsync().Result; MPSeed tmp = json.JsonDeserialize <MPSeed>(res); next = tmp.hash; }