AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

CURL in Delphi ausführen -d

Ein Thema von Ykcim · begonnen am 5. Feb 2025 · letzter Beitrag vom 10. Feb 2025
 
Ykcim

Registriert seit: 29. Dez 2006
Ort: NRW
856 Beiträge
 
Delphi 12 Athens
 
#10

AW: CURL in Delphi ausführen -d

  Alt 6. Feb 2025, 13:49
@uwe Raabe
Vielen Dank, dass habe ich verstanden. Das poDoNotEncode hatte ich bereits hinzugefügt.

Zitat:
Request.Params.AddItem('accept', 'application/json', pkHTTPHEADER, [poDoNotEncode]);
Request.Params.AddItem('content-type', 'application/x-www-form-urlencoded', pkHTTPHEADER, [poDoNotEncode]);
kannst du noch durch diese ersetzen:
markierenDelphi-Quellcode:
Request.Aaccept := 'application/json';
{ Das Setzen des ContentType kann entfallen (s.u.) }
Das werde ich mal ausprobieren. Ich habe viel zu wenig Ahnung, wie die Kommunikation bei REST-Abfragen über das Internet technisch funktioniert. Hast Du da eine gute Quelle, wo ich mir einen Überblick verschaffen kann?

@Kas Ob
Many thanks for your answer and the explanation. I have not CURL installed jet. I tried by CMD. What I do not understand is the fact, that the Query of the CURL by CMD gives an error: 400 Bad Request. I upload a screenshot of the cmd window. When I check the exact same CURL by https://reqbin.com/curl I get the right result. Unfortunately the first 4 hours I tried by cmd only...

I will check how to read the header and body of the request before executing.
Many thanks

Patrick
Angehängte Grafiken
Dateityp: jpg Fehler_CURL_Token.jpg (123,2 KB, 32x aufgerufen)
Patrick

Geändert von Ykcim ( 6. Feb 2025 um 16:18 Uhr)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:11 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz