Sayfayı Yazdır | Pencereyi Kapat

TCLHttp

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=1312
Tarih: 15 Nisan 2026 Saat 03:04
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: TCLHttp
Mesajı Yazan: ebrarflz
Konu: TCLHttp
Mesaj Tarihi: 12 Şubat 2026 Saat 13:48

API entegrasyonu üzerinde çalışıyorum.TCLHttp bileşeni ile API'nin endpoint adresine HTTP Get İsteği gönderiyorum.Tarayıcı üzerinden URL'yi denediğimde JSON verisi sorunsuz geliyor, ancak uygulama içerisinden istek attığımda bağlantı sağlanamıyor (veya boş dönüyor). Nasıl düzeltebilirim URL eklememin başka yolu var mı?

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">



Cevaplar:
Mesajı Yazan: M-Guney
Mesaj Tarihi: 12 Şubat 2026 Saat 16:17
Eğer ki Rest API kullanıyorsanız  https://www.docs.clomosy.com/index.php?title=TclRest" rel="nofollow - https://www.docs.clomosy.com/index.php?title=TclRest
Buradan bakabilirsiniz.
Probleminiz çözülmez ise geri dönüşünüzü bekliyorum. 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">


Mesajı Yazan: ebrarflz
Mesaj Tarihi: 12 Şubat 2026 Saat 17:56
Rest kullandım hatalar azaldı fakat (MyRest.Response )  response kısmında hata alıyorum bir çok şey denedim fakat çözemedim döngüde kullanıyorum bunu veri alırken 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">


Mesajı Yazan: Emr.Erkmn
Mesaj Tarihi: 12 Şubat 2026 Saat 18:18
Merhaba Ebrar, 
Hata aldığın mevcut kodu paylaşabilir misin? 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">


Mesajı Yazan: ebrarflz
Mesaj Tarihi: 13 Şubat 2026 Saat 09:15
// HAVA DURUMU ÇEKME 
void GetWeather;
{
  if (edtCity.Text == '') exit;

  strUrl = ' https://api.openweathermap.org/data/2.5/weather?q=" rel="nofollow - https://api.openweathermap.org/data/2.5/weather?q= ' + edtCity.Text + '&appid=086bce3b99dd35ec3b1cdfa932aa5839&units=metric&lang=tr';
  
  strVeri = MyHttp.GetRequest(strUrl);
  
  //HATA AŞAĞIDAKİ İF DE BAŞLIYOR
  if (strVeri != '')  //NOT kullandım fakat yine düzelmedi.
  {
      MyJson = TclJsonQuery.Create(nil);
      MyJson.Parse(strVeri);
      
      lblTemp.Text = MyJson.Select(MyJson.Root, 'main').GetString('temp') + '°C';
      lblDesc.Text = MyJson.Select(MyJson.Root, 'weather').Item(0).GetString('description');
      edtCity.Text = MyJson.GetString('name');
  }
}
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">


Mesajı Yazan: ebrarflz
Mesaj Tarihi: 13 Şubat 2026 Saat 09:41
// Response kullanımım bu şekildeydi bir çok şey denedim fakat doğru döngüyü kuramadım
void GetWeatherData;
{
  if (edtCity.Text == '') exit;

  MyRest.BaseURL = 'API';
  MyRest.Method = rmGET;
  MyRest.Execute;
 
  if (MyRest.Response != '')
  {
     try
       MyJson = TclJsonQuery.Create(nil);
       // RESPONSE BURADA KULLANILIYOR
       MyJson.Parse(MyRest.Response);
       
       lblTemp.Text = MyJson.Select(MyJson.Root, 'main').GetString('temp') + '°C';
       lblDesc.Text = MyJson.Select(MyJson.Root, 'weather').Item(0).GetString('description');
       edtCity.Text = MyJson.GetString('name');
     except
       ShowMessage('Veri Hatası.');
     }
  }

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">


Mesajı Yazan: ebrarflz
Mesaj Tarihi: 13 Şubat 2026 Saat 11:43
hallettim teşekkürler
void GetWeather;
{
  if (edtCity.Text == '') 
    ShowMessage('Lütfen bir şehir yazınız.');
  else
  {
    
    apiKey = 'api'; 
    
    strUrl = ' https://api.openweathermap.org/data/2.5/weather?q=" rel="nofollow - https://api.openweathermap.org/data/2.5/weather?q= ' + edtCity.Text + '&appid=' + apiKey + '&units=metric&lang=tr';
    
    try
      strVeri = MyHttp.GetRequest(strUrl);
      if (Pos('"temp":', strVeri) > 0)
      {
          ind = Pos('"temp":', strVeri);
          strTemp = Copy(strVeri, ind + 7, 20); 
          ind = Pos(',', strTemp); 
          if (ind > 0) strTemp = Copy(strTemp, 1, ind - 1);
          lblTemp.Text = strTemp + '°C';
          
          ind = Pos('"description":"', strVeri);
          if (ind > 0)
          {
            strDesc = Copy(strVeri, ind + 15, 50);
            ind = Pos('"', strDesc); 
            if (ind > 0) strDesc = Copy(strDesc, 1, ind - 1);
            lblDesc.Text = strDesc;
          }
             
          ind = Pos('"icon":"', strVeri);
          if (ind > 0)
          {
            strIcon = Copy(strVeri, ind + 8, 3); 
       
            MyForm.SetImage(imgIcon, ' https://openweathermap.org/img/wn/" rel="nofollow - https://openweathermap.org/img/wn/ ' + strIcon + '@4x.png');
          }
          
        
          ind = Pos('"name":"', strVeri);
          if (ind > 0)
          {
            strName = Copy(strVeri, ind + 8, 50);
            ind = Pos('"', strName);
            if (ind > 0) strName = Copy(strName, 1, ind - 1);
            edtCity.Text = strName;
          }
      }
      else
      {
         ShowMessage('Hata! Şehir bulunamadı veya API Anahtarı hatalı.');
         lblDesc.Text = 'Hata';
      }
    except
      ShowMessage('Bağlantı hatası!');
    }
  }
}


Mesajı Yazan: M-Guney
Mesaj Tarihi: 13 Şubat 2026 Saat 14:18
https://api.openweathermap.org/data/2.5/weather?lat=37&lon=32&appid=API_KEY%20" rel="nofollow - https://api.openweathermap.org/data/2.5/weather?lat=37&lon=32&appid=API_KEY Api'nın yönlendirdiği adreste hata var. Bu şekilde bi deneye bilir misin? 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