资源简介
最新版HttpHelper万能框架V2.4,最新C#采集框架,HttpHelper可以非常方便的实现Http协议的GET和POST请求、自动识 别编码、无视证书、优化Cookie、可以很方便的设置Cookie,Header,证书,代理等问题,仅限于大家学习交流使用,请大家于24小时之内删除,谢谢,本人概不负责因此学习交流24小时删除包引发的各种问题。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using CsharpHttpHelper.baseBll;
using System.Drawing;
using CsharpHttpHelper.Helper;
using CsharpHttpHelper.Item;
using System.Collections.Specialized;
using System.Runtime.Remoting.Messaging;
namespace CsharpHttpHelper
{
///
/// gethtml方法异步调用的委托
///
///
///
public delegate void ResultHandler(HttpResult item);
///
/// Http帮助类 Copyright:http://www.httphelper.com/
/// 版本:2.2.0
/// 作者:苏飞
/// 更新时间:2018-7-2
///
public class HttpHelper
{
#region Private Obj
///
/// HttpHelperBLL
///
private HttpHelperBll bll = new HttpHelperBll();
///
/// gethtml方法异步调用的委托
///
///
///
private delegate HttpResult GethtmlHandler(HttpItem item);
///
/// 异步调用方法委托
///
private ResultHandler resultheadler;
#endregion
#region HttpHelper
///
/// 根据相传入的数据,得到相应页面数据
///
/// 参数类对象
/// 返回HttpResult类型
public HttpResult GetHtml(HttpItem item)
{
return bll.GetHtml(item);
}
///
/// GetHtml方法的异步调用方式,根据相传入的数据,得到相应页面数据
///
/// 参数类对象
/// 回调的方法名
public void BeginInvokeGetHtml(HttpItem item ResultHandler resultMainName)
{
resultheadler = resultMainName;
GethtmlHandler handler = new GethtmlHandler(GetHtml);
handler.BeginInvoke(item new AsyncCallback(CallbackFunc) “AsycState:OK“);
}
///
/// 内部回调方法
///
/// 返回值
private void CallbackFunc(IAsyncResult resultType)
{
//result 是“加法类.Add()方法”的返回值
//AsyncResult 是IAsyncResult接口的一个实现类,引用空间:System.Runtime.Remoting.Messaging
//AsyncDelegate 属性可以强制转换为用户定义的委托的实际类。
GethtmlHandler handler = (GethtmlHandler)((AsyncResult)resultType).AsyncDelegate;
HttpResult result = handler.EndInvoke(resultType);
//回调方法传回执行结果
resultheadler.Invoke(result);
}
///
/// 根据Url获取图片
///
/// HttpItem参数
/// 返回图片,错误为NULL
public Image GetImage(HttpItem item)
{
return bll.GetImage(item);
}
///
/// 快速请求方
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-01-29 17:36 HttpHelper涓囪兘妗嗘灦V2.4\
文件 10244 2020-01-29 17:36 HttpHelper涓囪兘妗嗘灦V2.4\.DS_Store
目录 0 2020-01-29 17:37 __MACOSX\
目录 0 2020-01-29 17:37 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\
文件 120 2020-01-29 17:36 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\._.DS_Store
目录 0 2019-01-15 14:22 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\
文件 821 2017-07-04 11:14 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\HttpGet_Demo.aspx.designer.cs
目录 0 2020-01-29 17:37 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\
文件 213 2017-07-04 11:14 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\._HttpGet_Demo.aspx.designer.cs
文件 466 2017-07-04 11:14 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\HttpJson_Demo.aspx
文件 213 2017-07-04 11:14 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\._HttpJson_Demo.aspx
文件 2747 2017-07-04 11:14 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\Index.aspx.cs
文件 213 2017-07-04 11:14 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\._Index.aspx.cs
文件 470 2017-07-04 11:14 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\HttpHeader_Demo.aspx
文件 213 2017-07-04 11:14 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\._HttpHeader_Demo.aspx
文件 1681 2018-07-02 14:07 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\HttpGet_Demo.aspx.cs
文件 213 2018-07-02 14:07 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\._HttpGet_Demo.aspx.cs
文件 821 2017-07-04 11:14 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\HttpMD5_Demo.aspx.designer.cs
文件 213 2017-07-04 11:14 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\._HttpMD5_Demo.aspx.designer.cs
目录 0 2019-01-15 14:22 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\
目录 0 2019-01-15 14:22 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\Debug\
文件 21422 2019-01-15 14:22 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\Debug\CsharpHttpHelper_Demo.csprojAssemblyReference.cache
目录 0 2020-01-29 17:37 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\
目录 0 2020-01-29 17:37 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\Debug\
文件 213 2019-01-15 14:22 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\Debug\._CsharpHttpHelper_Demo.csprojAssemblyReference.cache
目录 0 2019-10-20 20:09 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\Debug\TempPE\
文件 213 2019-10-20 20:09 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\Debug\._TempPE
文件 42 2019-01-15 14:22 HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\Debug\CsharpHttpHelper_Demo.csproj.CoreCompileInputs.cache
文件 213 2019-01-15 14:22 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\Debug\._CsharpHttpHelper_Demo.csproj.CoreCompileInputs.cache
文件 213 2019-01-15 14:22 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\obj\._Debug
文件 213 2019-01-15 14:22 __MACOSX\HttpHelper涓囪兘妗嗘灦V2.4\CsharpHttpHelper_Demo\._obj
............此处省略237个文件信息
- 上一篇:停车场管理系统,C#实现,VS2017工程
- 下一篇:.NET C# 在线招聘系统
评论
共有 条评论