NetBlog主题

C# Get和Post请求与响应
C#基础

C# Get和Post请求与响应

2628 0

Get请求public static string HttpGet(string Url){try{HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);request.Method = "GET";request.ContentType = "text/html;charset=UTF-8";HttpWebResponse response = (HttpWebResponse)request.GetResponse();Str…