(DataFlex) Example: Http.GetCacheRoot method
Demonstrates the GetCacheRoot method.
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
String sTemp1
Integer iTemp1
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
// Establish 2 cache root directories.
Send ComAddCacheRoot To hoHttp "c:/example/httpCacheA/"
Send ComAddCacheRoot To hoHttp "c:/example/httpCacheB/"
Get ComNumCacheRoots Of hoHttp To iTemp1
Showln "Number of cache roots: " iTemp1
Get ComGetCacheRoot Of hoHttp 0 To sTemp1
Showln "1st cache root: " sTemp1
Get ComGetCacheRoot Of hoHttp 1 To sTemp1
Showln "2nd cache root: " sTemp1
// Output:
// Number of cache roots: 2
// 1st cache root: c:/example/httpCacheA/
// 2nd cache root: c:/example/httpCacheB/
End_Procedure
|