Browse Source

添加增强Http工具系列功能(但是还是推荐EasyHttp)

yuzhengyang 7 years ago
parent
commit
7613c54fef
48 changed files with 34105 additions and 86 deletions
  1. BIN
      Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide
  2. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide
  3. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-shm
  4. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-wal
  5. 4 0
      Fork.Net/Azylee.Utils/Azylee.Core/Azylee.Core.csproj
  6. 12 0
      Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/StringUtils/StringTool.cs
  7. 23 0
      Fork.Net/Azylee.Utils/Azylee.Core/NetUtils/IPFormatter.cs
  8. 23 0
      Fork.Net/Azylee.Utils/Azylee.Core/NetUtils/MacFormatter.cs
  9. 36 0
      Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/SoftInfoUtils/SoftwareInfo.cs
  10. 165 0
      Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/SoftInfoUtils/SoftwareTool.cs
  11. 7 1
      Fork.Net/Azylee.Utils/Azylee.YeahWeb/Azylee.YeahWeb.csproj
  12. 22 81
      Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/HttpToolPlus.cs
  13. 23 0
      Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/MethodUtils/ExtendUtils/HeaderTool.cs
  14. 48 0
      Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/MethodUtils/GetUtils/GetToolPlus.cs
  15. 59 0
      Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/MethodUtils/PostUtils/PostToolPlus.cs
  16. 19 0
      Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/Models/HttpContentTypes.cs
  17. 4 4
      Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/HttpMethodType.cs
  18. 12 0
      Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/Models/UserAgents.cs
  19. 11 0
      Fork.Net/Fork.Net.sln
  20. 48 0
      Fork.Net/Test/Test.HttpTool/Form1.Designer.cs
  21. 46 0
      Fork.Net/Test/Test.HttpTool/Form1.cs
  22. 120 0
      Fork.Net/Test/Test.HttpTool/Form1.resx
  23. 14 0
      Fork.Net/Test/Test.HttpTool/Models/UserModel.cs
  24. 21 0
      Fork.Net/Test/Test.HttpTool/Program.cs
  25. 36 0
      Fork.Net/Test/Test.HttpTool/Properties/AssemblyInfo.cs
  26. 71 0
      Fork.Net/Test/Test.HttpTool/Properties/Resources.Designer.cs
  27. 117 0
      Fork.Net/Test/Test.HttpTool/Properties/Resources.resx
  28. 30 0
      Fork.Net/Test/Test.HttpTool/Properties/Settings.Designer.cs
  29. 7 0
      Fork.Net/Test/Test.HttpTool/Properties/Settings.settings
  30. 95 0
      Fork.Net/Test/Test.HttpTool/Test.HttpTool.csproj
  31. 5 0
      Fork.Net/Test/Test.HttpTool/packages.config
  32. BIN
      Fork.Net/packages/EasyHttp.1.7.0/EasyHttp.1.7.0.nupkg
  33. BIN
      Fork.Net/packages/EasyHttp.1.7.0/lib/net40/EasyHttp.dll
  34. BIN
      Fork.Net/packages/JsonFx.2.0.1209.2802/JsonFx.2.0.1209.2802.nupkg
  35. BIN
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net20/JsonFx.dll
  36. 4561 0
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net20/JsonFx.xml
  37. BIN
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net35/JsonFx.dll
  38. 4865 0
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net35/JsonFx.xml
  39. BIN
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net40/JsonFx.dll
  40. 4877 0
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net40/JsonFx.xml
  41. BIN
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl35/JsonFx.dll
  42. 4830 0
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl35/JsonFx.xml
  43. BIN
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl40-wp/JsonFx.dll
  44. 4526 0
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl40-wp/JsonFx.xml
  45. BIN
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl40/JsonFx.dll
  46. 4842 0
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl40/JsonFx.xml
  47. BIN
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/wp40/JsonFx.dll
  48. 4526 0
      Fork.Net/packages/JsonFx.2.0.1209.2802/lib/wp40/JsonFx.xml

BIN
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-shm


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-wal


+ 4 - 0
Fork.Net/Azylee.Utils/Azylee.Core/Azylee.Core.csproj

@@ -82,6 +82,8 @@
     <Compile Include="LogUtils\SimpleLogUtils\LogType.cs" />
     <Compile Include="LogUtils\StatusLogUtils\StatusLogModel.cs" />
     <Compile Include="LogUtils\StatusLogUtils\StatusLog.cs" />
+    <Compile Include="NetUtils\IPFormatter.cs" />
+    <Compile Include="NetUtils\MacFormatter.cs" />
     <Compile Include="NetUtils\PingTool.cs" />
     <Compile Include="ProcessUtils\ProcessTool.cs" />
     <Compile Include="IOUtils\DirUtils\DirTool.cs" />
@@ -101,6 +103,8 @@
     <Compile Include="WindowsUtils\InfoUtils\NetcardInfoTool.cs" />
     <Compile Include="WindowsUtils\RegisterUtils\RegisterTool.cs" />
     <Compile Include="WindowsUtils\ShortcutUtils\ShortcutTool.cs" />
+    <Compile Include="WindowsUtils\SoftInfoUtils\SoftwareInfo.cs" />
+    <Compile Include="WindowsUtils\SoftInfoUtils\SoftwareTool.cs" />
   </ItemGroup>
   <ItemGroup />
   <ItemGroup>

+ 12 - 0
Fork.Net/Azylee.Utils/Azylee.Core/DataUtils/StringUtils/StringTool.cs

@@ -28,6 +28,18 @@ namespace Azylee.Core.DataUtils.StringUtils
             return false;
         }
         /// <summary>
+        /// 查看字符串包含字符(不区分大小写)
+        /// </summary>
+        /// <param name="s"></param>
+        /// <param name="word"></param>
+        /// <returns></returns>
+        public static bool Contains(string s,string word)
+        {
+            if (s.ToLower().Contains(word.ToLower()))
+                return true;
+            return false;
+        }
+        /// <summary>
         /// 分割字符串
         /// </summary>
         /// <param name="str"></param>

+ 23 - 0
Fork.Net/Azylee.Utils/Azylee.Core/NetUtils/IPFormatter.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace Azylee.Core.NetUtils
+{
+    public class IPFormatter
+    {
+        /// <summary>
+        /// 验证IP地址格式
+        /// </summary>
+        /// <param name="ip"></param>
+        /// <returns></returns>
+        public static bool CheckIp(string ip)
+        {
+            Regex r = new Regex(@"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$");
+            if (r.IsMatch(ip)) return true;
+            return false;
+        }
+    }
+}

+ 23 - 0
Fork.Net/Azylee.Utils/Azylee.Core/NetUtils/MacFormatter.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace Azylee.Core.NetUtils
+{
+    public class MacFormatter
+    {
+        /// <summary>
+        /// 验证MAC地址格式
+        /// </summary>
+        /// <param name="mac"></param>
+        /// <returns></returns>
+        public static bool CheckMac(string mac)
+        {
+            Regex r = new Regex("[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]");
+            if (r.IsMatch(mac)) return true;
+            return false;
+        }
+    }
+}

+ 36 - 0
Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/SoftInfoUtils/SoftwareInfo.cs

@@ -0,0 +1,36 @@
+using System;
+
+namespace Azylee.Core.WindowsUtils.SoftInfoUtils
+{
+    public class SoftwareInfo
+    {
+        /// <summary>
+        /// 软件名称
+        /// </summary>
+        public string Name { get; set; }
+        /// <summary>
+        /// 软件版本
+        /// </summary>
+        public string Version { get; set; }
+        /// <summary>
+        /// 开发商
+        /// </summary>
+        public string Publisher { get; set; }
+        /// <summary>
+        /// 帮助链接
+        /// </summary>
+        public string HelpLink { get; set; }
+        /// <summary>
+        /// 介绍链接
+        /// </summary>
+        public string URLInfoAbout { get; set; }
+        /// <summary>
+        /// 空间占用
+        /// </summary>
+        public int EstimatedSize { get; set; }
+        /// <summary>
+        /// 安装日期
+        /// </summary>
+        public DateTime InstallDate { get; set; }
+    }
+}

+ 165 - 0
Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/SoftInfoUtils/SoftwareTool.cs

@@ -0,0 +1,165 @@
+using Azylee.Core.DataUtils.CollectionUtils;
+using Microsoft.Win32;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+
+namespace Azylee.Core.WindowsUtils.SoftInfoUtils
+{
+    public class SoftwareTool
+    {
+        /// <summary>
+        /// 存在控制面板
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static bool ExistControl(string name)
+        {
+            if (GetControlList().Any(x => x.Name == name))
+                return true;
+            return false;
+        }
+        public static bool ExistControl(string[] names)
+        {
+            bool flag = false;
+            if (ListTool.HasElements(names))
+            {
+                foreach (var n in names)
+                {
+                    if (ExistControl(n))
+                        return true;
+                }
+            }
+            return flag;
+        }
+        public static List<SoftwareInfo> GetControlList()
+        {
+            List<SoftwareInfo> result = new List<SoftwareInfo>();
+            result.AddRange(GetControlList(Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall")));
+            result.AddRange(GetControlList(Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall")));
+            result.AddRange(GetControlList(Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall")));
+            result.AddRange(GetControlList(Registry.CurrentUser.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall")));
+            return result;
+        }
+        private static List<SoftwareInfo> GetControlList(RegistryKey key)
+        {
+            List<SoftwareInfo> result = new List<SoftwareInfo>();
+            try
+            {
+                if (key != null)//如果系统禁止访问则返回null
+                {
+                    foreach (string SubKeyName in key.GetSubKeyNames())
+                    {
+                        //打开对应的软件名称
+                        RegistryKey SubKey = key.OpenSubKey(SubKeyName);
+                        if (SubKey != null)
+                        {
+
+                            string name = SubKey.GetValue("DisplayName", "").ToString();
+                            string pub = SubKey.GetValue("Publisher", "").ToString();
+                            string version = SubKey.GetValue("DisplayVersion", "").ToString();
+                            string datestr = SubKey.GetValue("InstallDate", "").ToString();
+                            string sizestr = SubKey.GetValue("EstimatedSize", "").ToString();
+                            string helpurl = SubKey.GetValue("HelpLink", "").ToString();
+                            string abouturl = SubKey.GetValue("URLInfoAbout", "").ToString();
+                            DateTime date = DateTime.Parse("2001-10-25");//设置初始值为WindowsXP发布日期
+                            DateTime.TryParseExact(datestr, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out date);
+                            if (date.Year < 2001) date = DateTime.Parse("2001-10-25");
+
+                            int size = 0;
+                            int.TryParse(sizestr, out size);
+                            result.Add(new SoftwareInfo()
+                            {
+                                Name = name,
+                                Publisher = pub,
+                                Version = version,
+                                InstallDate = date,
+                                EstimatedSize = size,
+                                HelpLink = helpurl,
+                                URLInfoAbout = abouturl,
+                            });
+                        }
+                        SubKey?.Close();
+                    }
+                }
+                key?.Close();
+            }
+            catch { }
+            return result;
+        }
+        /// <summary>
+        /// 存在进程
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static bool ExistProcess(string name)
+        {
+            try
+            {
+                var p = Process.GetProcessesByName(name);
+                if (p != null && p.Length == 0)
+                    return false;
+                else
+                    return true;
+            }
+            catch { }
+            return false;
+        }
+        public static bool ExistProcess(string[] names)
+        {
+            bool flag = false;
+            if (!ListTool.IsNullOrEmpty(names))
+            {
+                foreach (var n in names)
+                {
+                    if (ExistProcess(n))
+                        return true;
+                }
+            }
+            return flag;
+        }
+        /// <summary>
+        /// 存在文件
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static bool ExistFile(string name)
+        {
+            if (File.Exists(name))
+                return true;
+            return false;
+        }
+        public static bool ExistFile(string[] names)
+        {
+            bool flag = false;
+            if (!ListTool.IsNullOrEmpty(names))
+            {
+                foreach (var n in names)
+                {
+                    if (ExistFile(n))
+                        return true;
+                }
+            }
+            return flag;
+        }
+        /// <summary>
+        /// 存在注册表项
+        /// </summary>
+        /// <param name="item"></param>
+        /// <param name="key"></param>
+        /// <returns></returns>
+        public static bool ExistRegist(string item, string key)
+        {
+            try
+            {
+                object obj = Registry.GetValue(item, key, null);
+                if (obj != null)
+                    return true;
+            }
+            catch { }
+            return false;
+        }
+    }
+}

+ 7 - 1
Fork.Net/Azylee.Utils/Azylee.YeahWeb/Azylee.YeahWeb.csproj

@@ -47,9 +47,14 @@
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationWebModel.cs" />
     <Compile Include="BaiDuWebAPI\IPLocationAPI\IPLocationTool.cs" />
     <Compile Include="FTPUtils\FTPTool.cs" />
-    <Compile Include="HttpUtils\HttpMethodType.cs" />
+    <Compile Include="HttpUtils\MethodUtils\ExtendUtils\HeaderTool.cs" />
+    <Compile Include="HttpUtils\MethodUtils\GetUtils\GetToolPlus.cs" />
+    <Compile Include="HttpUtils\MethodUtils\PostUtils\PostToolPlus.cs" />
+    <Compile Include="HttpUtils\Models\HttpContentTypes.cs" />
+    <Compile Include="HttpUtils\Models\HttpMethodTypes.cs" />
     <Compile Include="HttpUtils\HttpTool.cs" />
     <Compile Include="HttpUtils\HttpToolPlus.cs" />
+    <Compile Include="HttpUtils\Models\UserAgents.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -61,5 +66,6 @@
       <Name>Azylee.Core</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 22 - 81
Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/HttpToolPlus.cs

@@ -1,4 +1,9 @@
-using System;
+using Azylee.YeahWeb.HttpUtils.MethodUtils.ExtendUtils;
+using Azylee.YeahWeb.HttpUtils.MethodUtils.GetUtils;
+using Azylee.YeahWeb.HttpUtils.MethodUtils.PostUtils;
+using Azylee.YeahWeb.HttpUtils.Models;
+using Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
@@ -9,96 +14,32 @@ namespace Azylee.YeahWeb.HttpUtils
 {
     public class HttpToolPlus
     {
-        const string DefaultContentType = "application/x-www-form-urlencoded";
-        const string DefaultUserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)";
-        public static string Get(string url, ref CookieCollection cookie, Dictionary<string, string> headers = null, string contentType = DefaultContentType, bool autoRedirect = false, bool keepAlive = true, string userAgent = DefaultUserAgent)
+        public static string Get(string url, ref CookieCollection cookie, Dictionary<string, string> headers = null, string contentType = HttpContentTypes.ApplicationXWwwFormUrlEncoded, bool autoRedirect = false, bool keepAlive = true, string userAgent =  UserAgents.Mozilla4)
         {
-            string html = "";
-            Stream stream = null;
-            StreamReader reader = null;
-            try
-            {
-                HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
-                request.Method = "GET";
-                request.ContentType = DefaultContentType;
-                request.AllowAutoRedirect = autoRedirect;
-                request.KeepAlive = keepAlive;
-                request.UserAgent = DefaultUserAgent;
-                request.CookieContainer = new CookieContainer();
-                SetHeaders(ref request, headers);
-                if (cookie != null) request.CookieContainer.Add(cookie);
-                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
-                response.Cookies = request.CookieContainer.GetCookies(request.RequestUri);
-                cookie = response.Cookies;
-                stream = response.GetResponseStream();
-                reader = new StreamReader(stream, Encoding.Default);
-                html = reader.ReadToEnd();
-            }
-            catch
-            {
-            }
-            finally
-            {
-                if (reader != null) reader.Close();
-                if (stream != null) stream.Close();
-            }
-            return html;
+            return GetToolPlus.Get(url, ref cookie, headers = null, contentType, autoRedirect, keepAlive, userAgent);
         }
-        public static string Post(string url, ref CookieCollection cookie, string data = null, Dictionary<string, string> headers = null, string contentType = DefaultContentType, bool autoRedirect = true, bool keepAlive = true, string userAgent = DefaultUserAgent)
+        public static string Post(string url, ref CookieCollection cookie, Dictionary<string, string> data = null,Encoding encoding=null, Dictionary<string, string> headers = null, string contentType = HttpContentTypes.ApplicationXWwwFormUrlEncoded, bool autoRedirect = true, bool keepAlive = true, string userAgent = UserAgents.Mozilla4)
         {
-            string html = "";
-            Stream stream = null, dataStream = null;
-            StreamReader reader = null;
+            string param = null;
             try
             {
-                //配置属性
-                HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
-                request.Method = "POST";
-                request.ContentType = DefaultContentType;
-                request.AllowAutoRedirect = autoRedirect;
-                request.KeepAlive = keepAlive;
-                request.UserAgent = DefaultUserAgent;
-                request.CookieContainer = new CookieContainer();
-                SetHeaders(ref request, headers);
-                if (cookie != null) request.CookieContainer.Add(cookie);
-                //配置参数
-                if (data != null)
+                if (data != null && data.Count > 0)
                 {
-                    byte[] dataByte = Encoding.UTF8.GetBytes(data);
-                    request.ContentLength = dataByte.Length;
-                    dataStream = request.GetRequestStream();
-                    dataStream.Write(dataByte, 0, dataByte.Length);
+                    StringBuilder sb = new StringBuilder();
+                    foreach (var item in data)
+                    {
+                        sb.Append($"&{item.Key}={item.Value}");
+                    }
+                    param = sb.ToString().Substring(1);
                 }
-                //请求数据
-                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
-                response.Cookies = request.CookieContainer.GetCookies(request.RequestUri);
-                cookie = response.Cookies;
-                stream = response.GetResponseStream();
-                reader = new StreamReader(stream, Encoding.Default);
-                html = reader.ReadToEnd();
             }
-            catch
-            {
-            }
-            finally
-            {
-                if (reader != null) reader.Close();
-                if (stream != null) stream.Close();
-                if (dataStream != null) dataStream.Close();
-            }
-            return html;
+            catch { }
+            return PostToolPlus.Post(url, ref cookie, param, encoding, headers, contentType, autoRedirect, keepAlive, userAgent);
         }
-
-        private static bool SetHeaders(ref HttpWebRequest request, Dictionary<string, string> headers)
+        public static string PostJson(string url, ref CookieCollection cookie, object data, Encoding encoding = null, Dictionary<string, string> headers = null, bool autoRedirect = true, bool keepAlive = true, string userAgent = UserAgents.Mozilla4)
         {
-            try
-            {
-                if (request != null && headers != null && headers.Count > 0)
-                    foreach (var head in headers)
-                        request.Headers.Add(head.Key, head.Value);
-                return true;
-            }
-            catch { return false; }
+            string param = JsonConvert.SerializeObject(data);
+            return PostToolPlus.Post(url, ref cookie, param, encoding, headers, HttpContentTypes.ApplicationJson, autoRedirect, keepAlive, userAgent);
         }
     }
 }

+ 23 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/MethodUtils/ExtendUtils/HeaderTool.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Text;
+
+namespace Azylee.YeahWeb.HttpUtils.MethodUtils.ExtendUtils
+{
+    public static class HeaderTool
+    {
+        public static bool Set(ref HttpWebRequest request, Dictionary<string, string> headers)
+        {
+            try
+            {
+                if (request != null && headers != null && headers.Count > 0)
+                    foreach (var head in headers)
+                        request.Headers.Add(head.Key, head.Value);
+                return true;
+            }
+            catch { return false; }
+        }
+    }
+}

+ 48 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/MethodUtils/GetUtils/GetToolPlus.cs

@@ -0,0 +1,48 @@
+using Azylee.YeahWeb.HttpUtils.MethodUtils.ExtendUtils;
+using Azylee.YeahWeb.HttpUtils.Models;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+
+namespace Azylee.YeahWeb.HttpUtils.MethodUtils.GetUtils
+{
+    internal static class GetToolPlus
+    {
+        internal static string Get(string url, ref CookieCollection cookie, Dictionary<string, string> headers = null, string contentType = HttpContentTypes.ApplicationXWwwFormUrlEncoded, bool autoRedirect = false, bool keepAlive = true, string userAgent = UserAgents.Mozilla4)
+        {
+            string html = "";
+            Stream stream = null;
+            StreamReader reader = null;
+            try
+            {
+                HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
+                request.Method = "GET";
+                request.ContentType = contentType;
+                request.AllowAutoRedirect = autoRedirect;
+                request.KeepAlive = keepAlive;
+                request.UserAgent = userAgent;
+                request.CookieContainer = new CookieContainer();
+                HeaderTool.Set(ref request, headers);
+                if (cookie != null) request.CookieContainer.Add(cookie);
+                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+                response.Cookies = request.CookieContainer.GetCookies(request.RequestUri);
+                cookie = response.Cookies;
+                stream = response.GetResponseStream();
+                reader = new StreamReader(stream, Encoding.Default);
+                html = reader.ReadToEnd();
+            }
+            catch
+            {
+            }
+            finally
+            {
+                if (reader != null) reader.Close();
+                if (stream != null) stream.Close();
+            }
+            return html;
+        }
+    }
+}

+ 59 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/MethodUtils/PostUtils/PostToolPlus.cs

@@ -0,0 +1,59 @@
+using Azylee.YeahWeb.HttpUtils.MethodUtils.ExtendUtils;
+using Azylee.YeahWeb.HttpUtils.Models;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+
+namespace Azylee.YeahWeb.HttpUtils.MethodUtils.PostUtils
+{
+    internal static class PostToolPlus
+    {
+        internal static string Post(string url, ref CookieCollection cookie, string data = null, Encoding encoding = null, Dictionary<string, string> headers = null, string contentType = HttpContentTypes.ApplicationXWwwFormUrlEncoded, bool autoRedirect = true, bool keepAlive = true, string userAgent = UserAgents.Mozilla4)
+        {
+            string html = "";
+            Stream stream = null, dataStream = null;
+            StreamReader reader = null;
+            try
+            {
+                //配置属性
+                HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
+                request.Method = "POST";
+                request.ContentType = contentType;
+                request.AllowAutoRedirect = autoRedirect;
+                request.KeepAlive = keepAlive;
+                request.UserAgent = userAgent;
+                request.CookieContainer = new CookieContainer();
+                HeaderTool.Set(ref request, headers);
+                if (cookie != null) request.CookieContainer.Add(cookie);
+                //配置参数
+                if (data != null)
+                {
+                    byte[] dataByte = Encoding.UTF8.GetBytes(data);
+                    request.ContentLength = dataByte.Length;
+                    dataStream = request.GetRequestStream();
+                    dataStream.Write(dataByte, 0, dataByte.Length);
+                }
+                //请求数据
+                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+                response.Cookies = request.CookieContainer.GetCookies(request.RequestUri);
+                cookie = response.Cookies;
+                stream = response.GetResponseStream();
+                reader = new StreamReader(stream, encoding ?? Encoding.Default);
+                html = reader.ReadToEnd();
+            }
+            catch
+            {
+            }
+            finally
+            {
+                if (reader != null) reader.Close();
+                if (stream != null) stream.Close();
+                if (dataStream != null) dataStream.Close();
+            }
+            return html;
+        }
+    }
+}

+ 19 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/Models/HttpContentTypes.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.HttpUtils.Models
+{
+    public static class HttpContentTypes
+    {
+        public const string MultiPartFormData = "multipart/form-data";
+        public const string TextPlain = "text/plain";
+        public const string TextHtml = "text/html";
+        public const string TextCsv = "text/csv";
+        public const string ApplicationJson = "application/json";
+        public const string ApplicationXml = "application/xml";
+        public const string ApplicationXWwwFormUrlEncoded = "application/x-www-form-urlencoded";
+        public const string ApplicationOctetStream = "application/octet-stream";
+    }
+}

+ 4 - 4
Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/HttpMethodType.cs

@@ -3,11 +3,11 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 
-namespace Azylee.YeahWeb.HttpUtils
+namespace Azylee.YeahWeb.HttpUtils.Models
 {
-    public enum HttpMethodType
+    public enum HttpMethodTypes
     {
-        Get = 0,
-        Post = 1,
+        GET,
+        POST,
     }
 }

+ 12 - 0
Fork.Net/Azylee.Utils/Azylee.YeahWeb/HttpUtils/Models/UserAgents.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.YeahWeb.HttpUtils.Models
+{
+    public static class UserAgents
+    {
+        public const string Mozilla4 = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)";
+    }
+}

+ 11 - 0
Fork.Net/Fork.Net.sln

@@ -53,6 +53,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.CmdTool", "Test\Test.C
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.CpuTime", "Test\Test.CpuTime\Test.CpuTime.csproj", "{BB602C66-C94B-4258-B606-004227CC6BA3}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.HttpTool", "Test\Test.HttpTool\Test.HttpTool.csproj", "{8ED17932-7365-42DE-BE9B-ECF2B17155EC}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -237,6 +239,14 @@ Global
 		{BB602C66-C94B-4258-B606-004227CC6BA3}.Release|Any CPU.Build.0 = Release|Any CPU
 		{BB602C66-C94B-4258-B606-004227CC6BA3}.Release|x86.ActiveCfg = Release|Any CPU
 		{BB602C66-C94B-4258-B606-004227CC6BA3}.Release|x86.Build.0 = Release|Any CPU
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Debug|x86.Build.0 = Debug|Any CPU
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Release|x86.ActiveCfg = Release|Any CPU
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -263,6 +273,7 @@ Global
 		{6C69CF15-398D-4030-AA90-C617E52DC016} = {A89FC45A-A907-4487-8719-114530A62684}
 		{6F974809-DC4F-4490-B6D4-857036A234AB} = {A89FC45A-A907-4487-8719-114530A62684}
 		{BB602C66-C94B-4258-B606-004227CC6BA3} = {A89FC45A-A907-4487-8719-114530A62684}
+		{8ED17932-7365-42DE-BE9B-ECF2B17155EC} = {A89FC45A-A907-4487-8719-114530A62684}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {5436696D-5F55-490A-AB40-050B54BE2AB4}

+ 48 - 0
Fork.Net/Test/Test.HttpTool/Form1.Designer.cs

@@ -0,0 +1,48 @@
+namespace Test.HttpTool
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows 窗体设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.SuspendLayout();
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(284, 261);
+            this.Name = "Form1";
+            this.Text = "Form1";
+            this.Load += new System.EventHandler(this.Form1_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}
+

+ 46 - 0
Fork.Net/Test/Test.HttpTool/Form1.cs

@@ -0,0 +1,46 @@
+using Azylee.Core.Plus.DataUtils.JsonUtils;
+using Azylee.YeahWeb.HttpUtils;
+using EasyHttp.Http;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Windows.Forms;
+using Test.HttpTool.Models;
+
+namespace Test.HttpTool
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+
+        private void Form1_Load(object sender, EventArgs e)
+        {
+            UserModel user = new UserModel()
+            {
+                Account = "123",
+                Mac = "999",
+                Data = "ajfgdkvjdhgrewiuyhnb数据"
+            };
+
+            string s = JsonTool.ToStr(user);
+            Dictionary<string, string> data = new Dictionary<string, string>()
+            {
+                { "account","account"},{ "mac","mac123"},{ "data","somedata"},
+            };
+            CookieCollection cookie = new CookieCollection();
+            string html = HttpToolPlus.Post("http://localhost:9091/xtest/post1", ref cookie, data, Encoding.UTF8);
+
+
+            var http = new HttpClient();
+            var httpRs = http.Post("http://localhost:9091/xtest/post3", user, HttpContentTypes.ApplicationJson);
+        }
+    }
+}

+ 120 - 0
Fork.Net/Test/Test.HttpTool/Form1.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 14 - 0
Fork.Net/Test/Test.HttpTool/Models/UserModel.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Test.HttpTool.Models
+{
+    public class UserModel
+    {
+        public string Account { get; set; }
+        public string Mac { get; set; }
+        public string Data { get; set; }
+    }
+}

+ 21 - 0
Fork.Net/Test/Test.HttpTool/Program.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+
+namespace Test.HttpTool
+{
+    static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}

+ 36 - 0
Fork.Net/Test/Test.HttpTool/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Test.HttpTool")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Test.HttpTool")]
+[assembly: AssemblyCopyright("Copyright ©  2018")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("8ed17932-7365-42de-be9b-ecf2b17155ec")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
Fork.Net/Test/Test.HttpTool/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本: 4.0.30319.42000
+//
+//     对此文件的更改可能导致不正确的行为,如果
+//     重新生成代码,则所做更改将丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Test.HttpTool.Properties
+{
+
+
+    /// <summary>
+    ///   强类型资源类,用于查找本地化字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   返回此类使用的缓存 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test.HttpTool.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   覆盖当前线程的 CurrentUICulture 属性
+        ///   使用此强类型的资源类的资源查找。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
Fork.Net/Test/Test.HttpTool/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
Fork.Net/Test/Test.HttpTool/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Test.HttpTool.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
Fork.Net/Test/Test.HttpTool/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 95 - 0
Fork.Net/Test/Test.HttpTool/Test.HttpTool.csproj

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{8ED17932-7365-42DE-BE9B-ECF2B17155EC}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>Test.HttpTool</RootNamespace>
+    <AssemblyName>Test.HttpTool</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="EasyHttp, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\EasyHttp.1.7.0\lib\net40\EasyHttp.dll</HintPath>
+    </Reference>
+    <Reference Include="JsonFx, Version=2.0.1209.2802, Culture=neutral, PublicKeyToken=315052dd637f8a52, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\JsonFx.2.0.1209.2802\lib\net40\JsonFx.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Models\UserModel.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Azylee.Utils\Azylee.Core.Plus\Azylee.Core.Plus.csproj">
+      <Project>{915ae524-7efd-4ecc-b731-de1d1f5558f0}</Project>
+      <Name>Azylee.Core.Plus</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Azylee.Utils\Azylee.YeahWeb\Azylee.YeahWeb.csproj">
+      <Project>{ccf7a654-b442-4db1-bb3b-0f8014c3237f}</Project>
+      <Name>Azylee.YeahWeb</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 5 - 0
Fork.Net/Test/Test.HttpTool/packages.config

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="EasyHttp" version="1.7.0" targetFramework="net40" />
+  <package id="JsonFx" version="2.0.1209.2802" targetFramework="net40" />
+</packages>

BIN
Fork.Net/packages/EasyHttp.1.7.0/EasyHttp.1.7.0.nupkg


BIN
Fork.Net/packages/EasyHttp.1.7.0/lib/net40/EasyHttp.dll


BIN
Fork.Net/packages/JsonFx.2.0.1209.2802/JsonFx.2.0.1209.2802.nupkg


BIN
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net20/JsonFx.dll


File diff suppressed because it is too large
+ 4561 - 0
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net20/JsonFx.xml


BIN
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net35/JsonFx.dll


File diff suppressed because it is too large
+ 4865 - 0
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net35/JsonFx.xml


BIN
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net40/JsonFx.dll


File diff suppressed because it is too large
+ 4877 - 0
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/net40/JsonFx.xml


BIN
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl35/JsonFx.dll


File diff suppressed because it is too large
+ 4830 - 0
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl35/JsonFx.xml


BIN
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl40-wp/JsonFx.dll


File diff suppressed because it is too large
+ 4526 - 0
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl40-wp/JsonFx.xml


BIN
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl40/JsonFx.dll


File diff suppressed because it is too large
+ 4842 - 0
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/sl40/JsonFx.xml


BIN
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/wp40/JsonFx.dll


File diff suppressed because it is too large
+ 4526 - 0
Fork.Net/packages/JsonFx.2.0.1209.2802/lib/wp40/JsonFx.xml