diff options
| author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-02 13:42:52 +0000 | 
|---|---|---|
| committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-02 13:42:52 +0000 | 
| commit | 496396683c6fa15f2daf3c27567cbd26b7941e7c (patch) | |
| tree | 1f255fda65a0abcb62ed0add752b7b02fd2f2456 /Aggregator/Parser/Download.cs | |
| parent | 74d62003b3d4e4c4cb763fb4948852d8c1f13b82 (diff) | |
| download | newsaggregator-496396683c6fa15f2daf3c27567cbd26b7941e7c.tar.gz newsaggregator-496396683c6fa15f2daf3c27567cbd26b7941e7c.tar.bz2 newsaggregator-496396683c6fa15f2daf3c27567cbd26b7941e7c.zip | |
Made a static class to handle downloads
Diffstat (limited to 'Aggregator/Parser/Download.cs')
| -rw-r--r-- | Aggregator/Parser/Download.cs | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/Aggregator/Parser/Download.cs b/Aggregator/Parser/Download.cs new file mode 100644 index 0000000..30a2881 --- /dev/null +++ b/Aggregator/Parser/Download.cs @@ -0,0 +1,11 @@ +using System.Net; + +namespace Parser { +    public static class Download { +        public static string DownloadXML(string site) { +            using (var client = new WebClient()) { +                return client.DownloadString(site); +            } +        } +    } +} | 
