24 lines
545 B
C#
24 lines
545 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace TestWordAddIn1
|
|
{
|
|
internal class Http
|
|
{
|
|
public static String Get(string url)
|
|
{
|
|
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
|
|
var res = req.GetResponse();
|
|
using (var reader = new StreamReader(res.GetResponseStream()))
|
|
{
|
|
return reader.ReadToEnd();
|
|
}
|
|
}
|
|
}
|
|
}
|