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
 
Kas Ob.

Registriert seit: 3. Sep 2023
412 Beiträge
 
#7

AW: CURL in Delphi ausführen -d

  Alt 6. Feb 2025, 07:49
@Ykcim, Hi

Here few thoughts :
1) Skip WireShark as it is overkill in your situation, you have CURL commands which easily can be logged in full with -v (--verbose) you can have the headers in full but with --trace, you will have everything even the body (payload/post_content/data/post_data ... these just names for the same thing)
https://everything.curl.dev/usingcur...ose/trace.html
Also in your Delphi code you have access to Request then just right before Request.Execute; grab the headers and the body and log it or show it somewhere, then compare to find your problem, don't have these access to TRESTClient and TRESTRequest, so may be someone else here can help with that, i mean how to extract the header and the body also the URI/URL.

2) CURL command you pasted has "-d" for these parameters this means they are in the body request aka post payload, unlike your other question not long ago, see and remember there is 3 places data can be exchanged between HTTP client and server, in the URI, HTTP header or in the body, make sure to put each in its needed place as requested per documentation, for that use (1) above in case you are in doubt.

3) What Uwe suggested is right and should be followed always, for these common header fields that are known and almost always needed, you should use the provided and named property to set the values, in other words if there is a property TRESTRequest like these "Request.Accept und Client.ContentType" then use them and don't use the "Request.Params.AddItem('accept',...." or "Request.Params.AddItem('content-type',..."
Kas
  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 20:55 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