带参观访问问接口

带参观访问问接口

永利皇宫 1

//get 请求
        string url =
string.Format(“”);
        WebClient wc = new WebClient();
        Encoding enc = Encoding.GetEncoding(“UTF-8”);
永利皇宫 ,        Byte[] pageData = wc.DownloadData(url);
        string re = enc.GetString(pageData);

public static string GetPostString(string urladdress, string @params)
{
string returnValue = null;
using (WebClient client = new WebClient())
{
client.Headers.Add(“Content-Type”,
“application/x-www-form-urlencoded”);
client.Encoding = Encoding.UTF8;
returnValue = client.UploadString(urladdress, “POST”, @params);
}
return returnValue;
}

 

网站地图xml地图