forked from zw3639/BitcoinCracker
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUpdater.cs
More file actions
34 lines (31 loc) · 819 Bytes
/
Updater.cs
File metadata and controls
34 lines (31 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Cracker
{
public abstract class Updater
{
private string m_Url;
public Updater(string url)
{
m_Url = url;
}
protected string ReadJson()
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_Url);
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
return reader.ReadToEnd();
}
}
}
}
}