• .net中怎么调用外部的接口


    url:http://interFace1.test.com/apis/interFaceTest.aspx?id=123&pwd=123 HttpWebRequest myReq = (HttpWebRequest)HttpWebRequest.Create("接口地址-URL");
    myReq.Timeout = 12000;
    HttpWebResponse HttpWResp = (HttpWebResponse)myReq.GetResponse();
    Stream myStream =HttpWResp.GetResponseStream();
    StreamReader sr = new StreamReader(myStream, Encoding.Default);
    string  tempString = sr.ReadToEnd();
  • 相关阅读:
    bzoj 1856 组合
    bzoj 2809 左偏树平衡树启发式合并
    【HMOI】小C的填数游戏 DP+线段树维护
    【HNOI】 小A的树 tree-dp
    bzoj 1483 链表启发式合并
    bzoj 2733 平衡树启发式合并
    bzoj 2669 状压DP
    bzoj 2165 DP
    【HNOI】 lct tree-dp
    远程debug配置
  • 原文地址:https://www.cnblogs.com/zhangliang1988/p/2572486.html
Copyright © 2020-2023  润新知