最近项目需要和第三网站进行数据交换,第三方网站基本都是RESTfull形式的API,但是也有的是Web Service,或者.NET里面的WCF.微软鼓励大家使用WCF替代Web Service. Web Service技术介绍 Web Service是一个平台独立的,松耦合的,自包含的.基于可编程的Web应用程序,可使用开发的XML数据标准来描述.发布.发现.协调和配置这些应用程序,同时用于开发分布式的互操作的应用程序. WCF技术介绍 WCF是Web Service的升级版本.WCF是Win…
//获取账号名 var Name = document.getElementById("Text1").value;//获取密码 var Pass = document.getElementById("Password1").value; //获取真实姓名 var Realname = document.getElementById("Text3").value; //获取联系电话 var Telphone = document.getEleme…
public class Httphelper { public static string Post1(string url, string postString) { using (WebClient webClient = new WebClient()) { byte[] postData = Encoding.UTF8.GetBytes(postString);//编码, webClient.Headers.Add("Content-Type", "applicat…
最近的工作需要使用Bot Framework调用原有的WebAPI查询数据,查找了一些方法,大部分都是使用HttpClient调用的,现时贴出代码供参考 using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using System.Web; using System.Text; using Newtonsoft…