/// <summary>
        /// 请求数据
        /// </summary>
        /// <param name="channel"></param>
        /// <param name="ra"></param>
        /// <param name="parameters">参数属性</param>
        /// <param name="objs">参数</param>
        /// <returns></returns>
        private Task <HttpResponseMessage> Request(RequestAttribute ra, ParameterInfo[] parameters, params object[] objs)
        {
            Task <HttpResponseMessage> rd = null;
            string uri = HttpWebHelper.PathCombine(Uri, ra.Uri);

            switch (ra.RequestType)
            {
            case RequestType.Get:
                rd = GetRequest(uri, parameters, objs);
                break;

            default:
                rd = PostRequest(uri, objs);
                break;
            }
            return(rd);
        }
        private Task <HttpResponseMessage> SendStream(FileTransferAttribute sa, params object[] objs)
        {
            string uri = HttpWebHelper.PathCombine(Uri, sa.Uri);

            return(HttpWebNetwork.SendStream(uri, sa.ContentName, sa.ContentType, objs));
        }
示例#3
0
        public void TestMethod1()
        {
            string sss = HttpWebHelper.PathCombine("https://docs.microsoft.com", "/zh-cn/dotnet/breadcrumb/toc.json");

            Console.WriteLine(sss);
        }