mormot.net.client.pas
mormot.net.client.pas
/// Socket API based REST and HTTP/1.1 compatible client class
// - this component is HTTP/1.1 compatible, according to RFC 2068 document
// - the REST commands (GET/POST/PUT/DELETE) are directly available
// - open connection with the server with inherited Open(server,port) function
// - if KeepAlive>0, the connection is not broken: a further request (within
// KeepAlive milliseconds) will use the existing connection if available,
// or recreate a new one if the former is outdated or reset by server
// (will retry only once); this is faster, uses less resources (especialy
// under Windows), and is the recommended way to implement a HTTP/1.1 server
// - on any error (timeout, connection closed) will retry once to get the value
// - don't forget to use Free procedure when you are finished
THttpClientSocket = class(THttpSocket)
/// a class to handle HTTP/1.1 request using the libcurl library
// - libcurl is a free and easy-to-use cross-platform URL transfer library,
// able to directly connect via HTTP or HTTPS on most Linux systems
// - under a 32 bit Linux system, the libcurl library (and its dependencies,
// like OpenSSL) may not be installed - you can add it via your package
// manager, e.g. on Ubuntu:
// $ sudo apt-get install libcurl3
// - under a 64-bit Linux system, if compiled with Kylix, you should install
// the 32-bit flavor of libcurl, e.g. on Ubuntu:
// $ sudo apt-get install libcurl3:i386
// - will use in fact libcurl.so, so either libcurl.so.3 or libcurl.so.4,
// depending on the default version available on the system
TCurlHTTP = class(THttpRequest)
/// a class to handle HTTP/1.1 request using the WinHTTP API
// - has a common behavior as THttpClientSocket() but seems to be faster
// over a network and is able to retrieve the current proxy settings
// (if available) and handle secure https connection - so it seems to be the
// class to use in your client programs
// - WinHTTP does not share any proxy settings with Internet Explorer.
// The WinHTTP proxy configuration is set by either
// $ proxycfg.exe
// on Windows XP and Windows Server 2003 or earlier, either
// $ netsh.exe
// on Windows Vista and Windows Server 2008 or later; for instance,
// you can run either:
// $ proxycfg -u
// $ netsh winhttp import proxy source=ie
// to use the current user's proxy settings for Internet Explorer (under 64-bit
// Vista/Seven, to configure applications using the 32 bit WinHttp settings,
// call netsh or proxycfg bits from %SystemRoot%\SysWOW64 folder explicitely)
// - Microsoft Windows HTTP Services (WinHTTP) is targeted at middle-tier and
// back-end server applications that require access to an HTTP client stack
TWinHTTP = class(TWinHttpAPI)
/// a class to handle HTTP/1.1 request using the WinINet API
// - The Microsoft Windows Internet (WinINet) application programming interface
// (API) enables applications to access standard Internet protocols, such as
// FTP and HTTP/HTTPS, similar to what IE offers
// - by design, the WinINet API should not be used from a service, since this
// API may require end-user GUI interaction
// - note: WinINet is MUCH slower than THttpClientSocket or TWinHttp: do not
// use this, only if you find some configuration benefit on some old networks
// (e.g. to diaplay the dialup popup window for a GUI client application)
TWinINet = class(TWinHttpAPI)
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/14040283.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
2017-11-26 超市收银系统
2014-11-26 连锁快餐管理系统