wcf webHttpBinding Post 大数据量提交 ios c#客户端
一直在为安卓和苹果写服务,刚开始的时候全用的Get请求用url传所有的参数,由于url长度的限制大的数据量 无法传到服务器,提交图片什么的就更不用说了,后来用的POST请求,记录一下,做了一个很简单的小例子: c#源代码提供大家下载10Solution4.rar ios代码IOSHttpPostDemo.rar 开始做吧! 1建一个空工程Solution4,添加一个类库WcfSerDemo引入 System.ServiceModel 和System.ServiceModel.Web两个类库 建一个接口IMyWcfServerMethod [ServiceContract] public interface IMyWcfServerMethod { [OperationContract, WebInvoke(Method = "POST" , UriTemplate = "postMostStr/{streamLength}" , BodyStyle = WebMessageBodyStyle.Bare)] string postMostStr( string streamLengt...