| |
Retrieve web resources, upload data, and submit requests to web
services using HTTP or HTTPS. The class provides both convenient
transfer functions and direct control over requests, headers,
authentication, and response data for applications that work with web
servers and REST APIs.
Reference
Library Information
| Class Name |
CHttpClient |
| File Name |
CSHTPV12.DLL |
| Version |
12.0.3041.1380 |
| LibID |
E5D90316-2B5F-4E36-BD24-F58F1B47C3BF |
| Import Library |
CSHTPV12.LIB |
| Dependencies |
None |
| Standards |
RFC 1945, RFC 2616, RFC 7230, RFC 7540 |
Overview
The CHttpClient class provides methods for retrieving web
resources, uploading files, and exchanging data with web applications
and services. High-level methods handle common transfers using local
files, memory buffers, or strings, while lower-level methods allow
applications to send custom commands and read or write data directly.
Extended file transfer methods support resources larger than 4 GiB.
For web service integration, the class includes methods for
submitting JSON, XML, and plain text, issuing PATCH requests, and
sending requests with application-defined methods and content.
Applications can specify content types, add custom request headers,
and inspect response headers and status codes. The class handles the
HTTP exchange, while the application interprets the returned content
according to the service or resource being accessed.
Virtual form methods allow applications to assemble fields and
file attachments and submit them to a server for processing. Cookie
management methods provide access to values used to maintain
application state, and authentication methods support restricted
resources. The class also supports OAuth 2.0 bearer token
authentication for accessing protected web services and resources.
Applications are responsible for obtaining and refreshing access
tokens using the authorization process required by the service, while
the class handles their use when making authenticated requests.
Applications can also inspect redirect destinations, control the user
agent string, and enable support for compressed responses.
An HTTP file transfer queue supports applications that need to organize
multiple uploads or downloads from a web server. Queued files can be
inspected, removed, or canceled, and queue processing can be paused
and resumed. Asynchronous request and transfer methods, task management,
event callbacks, and transfer statistics allow applications to monitor
ongoing activity and coordinate it with other work.
The class supports HTTP/1.0, HTTP/1.1, HTTP/2, and HTTP/3, along
with proxy connections and secure connections using TLS 1.2 or later.
Client certificates can be supplied when required by the server.
Configurable timeouts, detailed result information, and optional
network tracing assist with troubleshooting. The class also supports
WebDAV operations for managing remote resources, including creating
collections, copying, moving, and deleting files and directories.
These operations depend on the capabilities of the server and the
access permissions granted to the application.
Requirements
The SocketTools Library Edition is compatible with any
programming language that can call functions exported from a
standard Windows DLL. If you are using Visual Studio, the
minimum supported version is Visual Studio 2010 with Service
Pack 1 (SP1). The header files are compatible with modern
C/C++ compilers, and function declarations are provided for
several other languages. We recommend installing the latest
updates for your development tools and the Windows SDK.
SocketTools supports Windows 7 SP1, Windows Server 2008 R2 SP1,
and later desktop and server versions of Windows, with Windows 8.1
as the minimum supported version for Windows 8-based systems.
Both 32-bit and 64-bit Windows platforms are supported for
application development. Windows on ARM requires Windows 10
build 1709 or later. We recommend using a version of Windows
that is currently supported by Microsoft for application
development.
SocketTools provides 32-bit x86, 64-bit x64, and native ARM64
libraries. The x86 libraries maintain compatibility with legacy
development tools and can run under emulation on Windows on ARM.
Native ARM32 applications are not supported because Microsoft
discontinued support for 32-bit ARM applications in Windows.
For native ARM64 development, we recommend Visual Studio 2019 or
later. Some development tools, including recent versions of
Embarcadero Delphi, support Windows on ARM using the ARM64EC
architecture. ARM64EC applications can use x64 DLLs through emulation,
but cannot load native ARM64 DLLs. Developers targeting ARM64EC
should use the SocketTools x64 libraries rather than the native
ARM64 libraries.
Import libraries are provided in COFF format for x86, x64, and
ARM64 platforms. OMF libraries are also provided for x86, and ELF
libraries for x64, to support older Borland and Embarcadero
compilers. Visual Studio developers should use the standard COFF
libraries. Some programming languages can call exported DLL
functions directly without requiring an import library.
Distribution
When distributing an application that uses this library, we
recommend installing the SocketTools DLL in the same folder as
the application executable. This simplifies deployment and
avoids potential conflicts with other applications that use
different versions of the library. The DLL must be compatible
with the application's processor architecture (x86, x64, or
ARM64). If the library is installed in a shared system location,
the installer should manage it as a shared DLL to prevent other
applications from being affected when it is updated or removed.
SocketTools libraries are standard Windows DLLs, not ActiveX
components, and do not require COM registration.
This library has no external runtime dependencies beyond the
standard Windows system libraries. It does not require the
Microsoft Visual C++ Redistributable or any additional third-party
libraries to be installed. All required components are either
provided by Windows or statically linked into the SocketTools DLLs,
simplifying deployment and eliminating the need to distribute
additional runtime files.
|
|