Sayfayı Yazdır | Pencereyi Kapat

TCL Rest kullanımı

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Clomosy ile değişken kullanımı
Forum Tanımlaması: TRObject dili ile değişken tanımlaması ve ekranda gösterme
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1231
Tarih: 17 Kasım 2025 Saat 22:00
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: TCL Rest kullanımı
Mesajı Yazan: M-Guney
Konu: TCL Rest kullanımı
Mesaj Tarihi: 17 Kasım 2025 Saat 16:55
Birden fazla resmi Base64 formatında API'mdan yollayıp kullanmak istiyorum fakat bana boş dönüyor ne yapmam gerekiyor.

void GetItems
var LRest : TCLRest;
  {
  LRest = uDataLib.GetWithRes('category-images');
  //LRest = uDataLib.GetImageWithRes('category-images');  //For images
  LRest.OnCompleted = 'GetItemsCompletedV';
  LRest.ExecuteAsync;
  LRest.ClearBody;
}

function GetWithRes(AResource : String):TCLRest
var 
LRest : TCLRest
{
  LRest = TCLRest.Create;
  try
      if (Clomosy.AppPlatform == 0) // is Windows
      {
        LRest.BaseURL = ' http://172.16.222.25:3000/" rel="nofollow - http://172.16.222.25:3000/ ';
      }else {
        LRest.BaseURL = ' https://m-guney.com.tr/" rel="nofollow - https://m-guney.com.tr/ ';
      }
      LRest.Resource = AResource;
      LRest.Accept = 'application/json';
      LRest.Method = rmGET;
  
  LRest.AddHeader('Authorization','Bearer ' + Clomosy.GlobalVariableString);
finally
  Result = LRest;
  //LRest.Free;
}
}


function GetImageWithRes(AResource : String):TCLRest
var 
LRest : TCLRest
{
  LRest = TCLRest.Create;
  try 
    if (Clomosy.AppPlatform == 0) // is Windows
    {
      LRest.BaseURL = ' http://172.16.222.25:3000/" rel="nofollow - http://172.16.222.25:3000/ ';
    }else {
      LRest.BaseURL = ' https://m-guney.com.tr/" rel="nofollow - https://m-guney.com.tr/ ';
    }
    LRest.Resource = AResource;// Ornek olarak 7
    LRest.Accept = 'image/png'; // Eğer ki resim png değil JPEG  olsa bile resmi getirir.
    LRest.Method = rmGET;
    LRest.AddHeader('Authorization','Bearer ' + Clomosy.GlobalVariableString);
  finally
    Result = LRest;
  }
}
https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net