Sample code for 30+ languages & platforms
C++

Example: Http.GetCacheRoot method

Demonstrates the GetCacheRoot method.

Chilkat C++ Downloads

C++
#include <CkHttp.h>

void ChilkatSample(void)
    {
    CkHttp http;

    //  Establish 2 cache root directories.
    http.AddCacheRoot("c:/example/httpCacheA/");
    http.AddCacheRoot("c:/example/httpCacheB/");

    std::cout << "Number of cache roots: " << http.get_NumCacheRoots() << "\r\n";

    std::cout << "1st cache root: " << http.getCacheRoot(0) << "\r\n";
    std::cout << "2nd cache root: " << http.getCacheRoot(1) << "\r\n";

    //  Output:

    //  Number of cache roots: 2
    //  1st cache root: c:/example/httpCacheA/
    //  2nd cache root: c:/example/httpCacheB/
    }