惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
P
Privacy International News Feed
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
NISL@THU
NISL@THU
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
GbyAI
GbyAI
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Y
Y Combinator Blog
C
CERT Recently Published Vulnerability Notes
N
Netflix TechBlog - Medium
S
Security Affairs
Spread Privacy
Spread Privacy
罗磊的独立博客
腾讯CDC
MyScale Blog
MyScale Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
L
LINUX DO - 热门话题
The Cloudflare Blog
L
LangChain Blog
博客园_首页
H
Hacker News: Front Page
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
SecWiki News
SecWiki News
A
Arctic Wolf
爱范儿
爱范儿
Google Online Security Blog
Google Online Security Blog
T
Threat Research - Cisco Blogs
Hacker News - Newest:
Hacker News - Newest: "LLM"
有赞技术团队
有赞技术团队
The GitHub Blog
The GitHub Blog
Cyberwarzone
Cyberwarzone
博客园 - 叶小钗
V
Visual Studio Blog
V
V2EX
T
Tailwind CSS Blog
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
D
Docker

博客园 - edobnet

phonegap 开发初探 .net C# ADC接口中DES加密算法 SQL 2005自动备份文件删除 短信猫与中国移动CMPP2。0收发短信实例 通过OSQL命令执行SQL SERVER批SQL 针对sql 2005优化的高性能分页存储过程 .net framework 2.0以上修改config配制更容易 - edobnet LinQ操作汇总(From CSharpSamples) 远程注册表读取,与多线程池的应用. 使用JAVASCRIPT控制,IFAME的内容,从而使用投票点击等功能 ADSL自动断拨号类 类拟EXCEL表格锁定的功能的实现! - edobnet - 博客园 线程,线程数控制! sql Server 2000 分区视图的运用 利用.Net 线程池提高应用程序性能. google 中国编程大赛测试题,及自己的解答 触发器在增量同步数据的运用. 进程服务编写,与启动停止控制 js异步XMLhttpPost,并带有,等待显示,防正,XMLhttpPost请求时间过来,而使浏览器死掉! - edobnet - 博客园
阿里软件接口开发基础(淘宝网) C#
edobnet · 2009-02-05 · via 博客园 - edobnet

主要开发文件见:

http://wiki.isv.alisoft.com/index.php?tracelog=doc_from_home

当前JAVA例子比较多,C#比较少,

下面提供本人开发一些例子:

向服务器发送请求类:

 public static XmlDocument HttpRequest(string data)
        {
            
//ASCIIEncoding encoding = new ASCIIEncoding();
            byte[] postdata = System.Text.Encoding.UTF8.GetBytes(data);//所有要传参数拼装
            
// Prepare web request
            
//目前阿里软件的服务集成平台(SIP)的接口测试地址是:http://sipdev.alisoft.com/sip/rest,生产环境地址是:http://sip.alisoft.com/sip/rest,
            
//这里使用测试接口先,到正式上线时需要做切换
            string url = System.Configuration.ConfigurationManager.AppSettings["APPURL"];
            HttpWebRequest myRequest 
= (HttpWebRequest)WebRequest.Create(url);
            myRequest.Method 
= "POST";
            myRequest.ContentType 
= "application/x-www-form-urlencoded";
            myRequest.ContentLength 
= postdata.Length;
            Stream newStream 
= myRequest.GetRequestStream();
            
// Send the data.
            newStream.Write(postdata, 0, postdata.Length);
            newStream.Close();
            
// Get response
            HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
            StreamReader reader 
= new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8);

            XmlDocument xmlDoc 

= new XmlDocument();
            xmlDoc.LoadXml(reader.ReadToEnd());
            XmlNode node 
= xmlDoc.SelectSingleNode("/error_rsp/code");
            
if (node != null && node.InnerText != string.Empty)
            {
throw new ApiException(node.InnerText, xmlDoc.SelectSingleNode("/error_rsp/msg").InnerText);
            }
            
return xmlDoc;

        }

public static string HttpRequest(string data, string xPath)
        {
            XmlDocument doc 
= HttpRequest(data);
            
return doc.SelectSingleNode(xPath).InnerText;
        }
        
public static string MD5(string data)
        {
            MD5CryptoServiceProvider md5 
= new MD5CryptoServiceProvider();
            
return BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes(data))).Replace("-""");
        }

对参数进行排序类:

对参数时行排序

淘宝相关的一个操作类:

TAOBAO EXAMPLE

代码下载