zoukankan      html  css  js  c++  java
  • 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)

  • 相关阅读:
    hdu 5366 简单递推
    hdu 5365 判断正方形
    hdu 3635 并查集
    hdu 4497 数论
    hdu5419 Victor and Toys
    hdu5426 Rikka with Game
    poj2074 Line of Sight
    hdu5425 Rikka with Tree II
    hdu5424 Rikka with Graph II
    poj1009 Edge Detection
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/14040283.html
Copyright © 2011-2022 走看看