• 大小: 239KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-15
  • 语言: C#
  • 标签: c#  快递  

资源简介

能运行查快递,接口实现,适合有一定基础的看。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;

namespace kuaidi
{
   public class HttpRequstCommand
    {
        /// 
        /// GET模拟请求
        /// 

        /// URL路径
        /// 参数
        /// 返回请求信息
        public static string HttpGet(string Url string postDataStr)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url + (postDataStr == ““ ? ““ : “?“) + postDataStr);
            request.AllowAutoRedirect = true;
            request.Method = “GET“;
            request.ContentType = “text/html;charset=UTF-8“;
            System.Net.CookieContainer c = new System.Net.CookieContainer();
            request.CookieContainer = c;
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            Stream myResponseStream = response.GetResponseStream();
            StreamReader myStreamReader = new StreamReader(myResponseStream Encoding.GetEncoding(“utf-8“));
            string retString = myStreamReader.ReadToEnd();
            myStreamReader.Close();
            myResponseStream.Close();
            return retString;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        144  2013-12-16 14:21  test\kuaidi\kuaidi\app.config

     文件       7719  2013-12-16 11:30  test\kuaidi\kuaidi\bin\Debug\Database.xml

     文件      46592  2013-12-16 15:13  test\kuaidi\kuaidi\bin\Debug\kuaidi.exe

     文件        144  2013-12-16 14:21  test\kuaidi\kuaidi\bin\Debug\kuaidi.exe.config

     文件      32256  2013-12-16 15:13  test\kuaidi\kuaidi\bin\Debug\kuaidi.pdb

     文件      11600  2013-12-17 08:19  test\kuaidi\kuaidi\bin\Debug\kuaidi.vshost.exe

     文件        144  2013-12-16 14:21  test\kuaidi\kuaidi\bin\Debug\kuaidi.vshost.exe.config

     文件        490  2010-03-17 22:39  test\kuaidi\kuaidi\bin\Debug\kuaidi.vshost.exe.manifest

    .......    424960  2013-11-26 15:12  test\kuaidi\kuaidi\bin\Debug\Newtonsoft.Json.dll

     文件       7719  2013-12-16 11:30  test\kuaidi\kuaidi\Database.xml

     文件       1344  2013-12-16 11:53  test\kuaidi\kuaidi\HttpRequstCommand.cs

     文件      16958  2013-12-16 15:13  test\kuaidi\kuaidi\img2ico.net-2db19da988e27b4ed70d450d89cd28c8.ico

     文件       1181  2013-12-16 14:17  test\kuaidi\kuaidi\JsonCommon.cs

     文件       1753  2013-12-16 15:13  test\kuaidi\kuaidi\kuaidi.cs

     文件       4567  2013-12-16 15:13  test\kuaidi\kuaidi\kuaidi.csproj

     文件       5170  2013-12-16 15:13  test\kuaidi\kuaidi\kuaidi.Designer.cs

     文件      31555  2013-12-16 15:13  test\kuaidi\kuaidi\kuaidi.resx

     文件       4501  2013-12-16 13:52  test\kuaidi\kuaidi\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6661  2013-12-16 15:13  test\kuaidi\kuaidi\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        692  2013-12-16 15:13  test\kuaidi\kuaidi\obj\x86\Debug\GenerateResource.read.1.tlog

     文件       1182  2013-12-16 15:13  test\kuaidi\kuaidi\obj\x86\Debug\GenerateResource.write.1.tlog

     文件        834  2013-12-17 08:19  test\kuaidi\kuaidi\obj\x86\Debug\kuaidi.csproj.FileListAbsolute.txt

     文件      46592  2013-12-16 15:13  test\kuaidi\kuaidi\obj\x86\Debug\kuaidi.exe

     文件      17524  2013-12-16 15:13  test\kuaidi\kuaidi\obj\x86\Debug\kuaidi.kuaidi.resources

     文件      32256  2013-12-16 15:13  test\kuaidi\kuaidi\obj\x86\Debug\kuaidi.pdb

     文件        180  2013-12-16 15:13  test\kuaidi\kuaidi\obj\x86\Debug\kuaidi.Properties.Resources.resources

     文件       7194  2013-12-16 14:21  test\kuaidi\kuaidi\obj\x86\Debug\ResolveAssemblyReference.cache

     文件       4608  2013-12-16 14:21  test\kuaidi\kuaidi\obj\x86\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件        488  2013-12-16 10:55  test\kuaidi\kuaidi\Program.cs

     文件       1362  2013-12-16 10:45  test\kuaidi\kuaidi\Properties\AssemblyInfo.cs

............此处省略20个文件信息

评论

共有 条评论