network.fishlee.net 3.0.2

dotnet add package network.fishlee.net --version 3.0.2
NuGet\Install-Package network.fishlee.net -Version 3.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="network.fishlee.net" Version="3.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add network.fishlee.net --version 3.0.2
#r "nuget: network.fishlee.net, 3.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install network.fishlee.net as a Cake Addin
#addin nuget:?package=network.fishlee.net&version=3.0.2

// Install network.fishlee.net as a Cake Tool
#tool nuget:?package=network.fishlee.net&version=3.0.2

FSLIB.NETWORK 类库

本库目前仅供操作 HTTP 资源

背景

开始在设计订票助手.NET的时候,我就在策划写一个比较易用的HTTP客户端库来完成底层的操作。由于.NET原生的HttpWebRequest比较复杂难用,而内置的WebClient先天不足。

.NET 4.5中新增了HttpClient,但可惜.NET4.0不支持XP,所以暂时只能放弃HttpClient了。在这种种背景之下,我花了很长的时间来打磨这个网络库。虽然起名叫Network,但是目前专注于HTTP库。

这个网络库在订票助手.NET中得到了广泛全面的使用,几乎所有对12306发出的请求都是由它发出的。在订票助手.NET中,最近四个月中,由它发出的请求过亿,其稳定性也是蛮有保证的嘛。

功能特点&运行需求

其实它是对HttpWebRequest/HttpWebResponse的包装,目的是为了用起来更简单明了。设计的时候就为了提供更高的可用性和扩展性。所以……它具备……如下的特性。

  • 高综合处理能力:自动处理Cookies,自动跟踪引用页,自动GZIP压缩解压缩,自动编码识别……
  • 自动的数据处理能力:理论上你想发的数据,不用转换丢给它,它都能给你发出去;理论上你想收的对象,类型丢给它, 它都能给你弄回来……
  • 高健壮性:如果不是特殊情况,坚决不抛异常让你去catch。相反的是,它用状态来向你表示结果是否正确
  • 高处理能力:完全多线程处理,支持同步、异步、任务模式,异步时甚至能自动处理同步线程上下文,想用.NET中的await?没问题
  • 高扩展性:丰富的事件以及扩展性支持,你可以继承它来实现自己想做的事情。甚至都自带了抓包。。。。

由于编写时使用了大量的匿名类型和表达式,因此不能用于.NET3.5以下的平台。目前支持的平台为.NET3.5/4/4.5。其中,运行在3.5平台上时,个别特性无法使用。

项目说明

项目采用 .NET CORE 项目格式(project.json),故需要最低 Visual Studio 2015 Update3 方可编译。

如果您不是有刚需自行编译项目的话,一般推荐直接通过 NUGET 包管理器安装 FSLIB.NETWOK 包

其它资源

授权

Apache License

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Framework net35 is compatible.  net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on network.fishlee.net:

Package Downloads
network.fishlee.net_html.adapter

HtmlAgality Adapter for iFish's Network Library (HTTP)

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on network.fishlee.net:

Repository Stars
iccfish/BtResourceGrabber
一个开源的BT综合搜索引擎
iccfish/Cn12306UnofficalClient
12306非官方客户端
EraserKing/Unblock163MusicClient
Unblock 163 Cloud Music Windows client.
Version Downloads Last updated
3.0.2 283 9/12/2023
3.0.1 655 1/27/2022
3.0.0 459 1/26/2022
2.3.2 504 1/5/2022
2.3.1 1,303 6/28/2019
2.3.0 1,325 12/19/2018
2.2.5 1,105 7/19/2018
2.2.4 1,486 3/21/2018
2.2.2 3,131 9/19/2016
2.2.1 1,239 8/30/2016
2.2.0 1,650 8/15/2016
2.0.0 1,379 4/5/2016
1.6.0 1,783 12/13/2015
1.5.6 1,530 9/21/2015
1.5.5 1,111 9/20/2015
1.5.4.1 1,177 9/13/2015
1.5.3 1,105 8/29/2015
1.5.2 1,111 8/17/2015
1.5.1 1,650 8/10/2015
1.5.0 1,555 6/9/2015
1.4.0.2 1,113 5/13/2015
1.4.0 1,106 5/8/2015
1.2.0.356 1,594 2/6/2015
1.1.3.345 1,183 1/29/2015
1.1.1.335 1,084 1/20/2015
1.1.1.330 1,153 1/18/2015
1.1.0.317 1,087 1/18/2015
1.0.16.231 1,191 1/6/2015
1.0.15.225 1,172 1/6/2015

修正部分请求设置无效的问题