-
大小: 930KB文件类型: .zip金币: 2下载: 3 次发布日期: 2021-07-10
- 语言: Html/CSS
- 标签: HttpHelper
资源简介
轻松GET、玩转POST、HTML分析、无视编码、验证码提取、Cookie分析互转、Url格式化、加密、代理IP、证书、Json数据分析、执行JavaScript. 仅限于大家学习交流使用,请大家于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 2019-12-15 08:30 HttpHelper-2.3\
文件 33280 2019-12-15 08:27 HttpHelper-2.3\HttpHelper.dll
目录 0 2019-12-15 08:30 HttpHelper-2.3\源码\
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\.vs\
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\.vs\config\
文件 85618 2019-01-15 14:22 HttpHelper-2.3\源码\.vs\config\applicationhost.config
目录 0 2019-12-15 08:26 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\
目录 0 2019-11-08 20:01 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v14\
文件 38400 2019-11-08 20:01 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v14\.suo
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v15\
文件 88576 2019-10-20 20:09 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v15\.suo
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v15\Server\
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v15\Server\sqlite3\
文件 0 2019-01-15 14:22 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v15\Server\sqlite3\db.lock
文件 4096 2019-01-15 14:22 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v15\Server\sqlite3\storage.ide
文件 32768 2019-10-20 20:08 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v15\Server\sqlite3\storage.ide-shm
文件 3522632 2019-10-20 20:09 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v15\Server\sqlite3\storage.ide-wal
目录 0 2019-12-15 08:26 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v16\
文件 62976 2019-12-15 08:30 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v16\.suo
目录 0 2019-12-15 08:26 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v16\Server\
目录 0 2019-12-15 08:30 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v16\Server\sqlite3\
文件 0 2019-12-15 08:26 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v16\Server\sqlite3\db.lock
文件 638976 2019-12-15 08:30 HttpHelper-2.3\源码\.vs\CsharpHttpHelper\v16\Server\sqlite3\storage.ide
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\CsharpHttpHelper\
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\CsharpHttpHelper\ba
文件 21372 2019-03-25 21:49 HttpHelper-2.3\源码\CsharpHttpHelper\ba
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\CsharpHttpHelper\ba
文件 2731 2017-07-04 11:14 HttpHelper-2.3\源码\CsharpHttpHelper\ba
目录 0 2019-11-08 19:37 HttpHelper-2.3\源码\CsharpHttpHelper\bin\
目录 0 2019-12-15 08:27 HttpHelper-2.3\源码\CsharpHttpHelper\bin\Debug\
文件 33280 2019-12-15 08:27 HttpHelper-2.3\源码\CsharpHttpHelper\bin\Debug\HttpHelper.dll
............此处省略102个文件信息
- 上一篇:HttpHelper万能框架V2.245180
- 下一篇:编译原理-简单计算器
评论
共有 条评论