浏览代码

[httpclient] fixed older versions compatibility

Exilon 4 年之前
父节点
当前提交
0d850bd55a
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8 4
      Quick.HttpClient.pas

+ 8 - 4
Quick.HttpClient.pas

@@ -1,13 +1,13 @@
 { ***************************************************************************
 { ***************************************************************************
 
 
-  Copyright (c) 2016-2018 Kike Pérez
+  Copyright (c) 2016-2021 Kike Pérez
 
 
   Unit        : Quick.HttpClient
   Unit        : Quick.HttpClient
   Description : Json Http Client
   Description : Json Http Client
   Author      : Kike Pérez
   Author      : Kike Pérez
   Version     : 1.1
   Version     : 1.1
   Created     : 22/05/2018
   Created     : 22/05/2018
-  Modified    : 02/05/2020
+  Modified    : 02/08/2021
 
 
   This file is part of QuickLib: https://github.com/exilon/QuickLib
   This file is part of QuickLib: https://github.com/exilon/QuickLib
 
 
@@ -323,7 +323,9 @@ procedure TJsonHttpClient.SetConnectionTimeout(const aValue: Integer);
 begin
 begin
   fConnectionTimeout := aValue;
   fConnectionTimeout := aValue;
   {$IFDEF DELPHIXE8_UP}
   {$IFDEF DELPHIXE8_UP}
-  fHTTPClient.ConnectionTimeout := aValue;
+    {$IFDEF DELPHIRX102_UP} //in previous versions don't exists ConnectionTimeout property
+    fHTTPClient.ConnectionTimeout := aValue;
+    {$ENDIF}
   {$ELSE}
   {$ELSE}
   fHTTPClient.ConnectTimeout := aValue;
   fHTTPClient.ConnectTimeout := aValue;
   {$ENDIF}
   {$ENDIF}
@@ -353,7 +355,9 @@ procedure TJsonHttpClient.SetResponseTimeout(const aValue: Integer);
 begin
 begin
   fResponseTimeout := aValue;
   fResponseTimeout := aValue;
   {$IFDEF DELPHIXE8_UP}
   {$IFDEF DELPHIXE8_UP}
-  fHTTPClient.ResponseTimeout := aValue;
+    {$IFDEF DELPHIRX102_UP} //in previous versions don't exist ResponseTimeout property
+    fHTTPClient.ResponseTimeout := aValue;
+    {$ENDIF}
   {$ELSE}
   {$ELSE}
   fHTTPClient.ReadTimeout := aValue;
   fHTTPClient.ReadTimeout := aValue;
   {$ENDIF}
   {$ENDIF}