![]() |
AW: Indy 10 HTTP(S) Protokoll
Randbemerkung: Um OpenSSL kann man aber nur einen Bogen machen, wenn man nicht plattformübergreifend entwickeln will.
Sherlock |
AW: Indy 10 HTTP(S) Protokoll
Zitat:
Wobei ich jetzt aber auch dazu sagen muss, dass ich mit Indy+OpenDLL nie wirklich Probleme hatte, außer denen die ich selbst reinprogrammiert habe ;-) |
AW: Indy 10 HTTP(S) Protokoll
Hallo,
zu Redirects findest Du für Indy hier was ![]() |
AW: Indy 10 HTTP(S) Protokoll
Zitat:
|
AW: Indy 10 HTTP(S) Protokoll
Hey ho,
danke für das Tutorial, es hat mir gut geholfen! An einer Stelle stolpere ich allerdings etwas und zwar bei der POST Methode. Ich hab den Code aus dem Tutorial übernommen und etwas angepasst:
Delphi-Quellcode:
An folgender Stelle:
procedure TProgWebAppFrm.HTTPPost(Username : String; Password : String; Database : String);
var Params: TStringList; Enc: TEncoding; ResponseStr: string; begin with TIdHTTP.Create(nil) do try Request.ContentType := 'application/x-www-form-urlencoded'; Params := TStringList.Create; try with Params do begin Add('username=' + Username); Add('password=' + Password); Add('database=' + Database); end; // Request.CharSet vorher setzten: z.B: ISO-8859-1 Enc := CharsetToEncoding(Request.CharSet); try // Daten senden ResponseStr := Post('https://nb1819157:5001/login?', Params, Enc); finally Enc.Free; end; finally Params.Free; end; finally Free; end; end;
Delphi-Quellcode:
Kommt nun der Fehler, dass die Typen TEncoding und IIdTextEncoding nicht miteinander kompatibel sind. Das verstehe ich soweit auch, aber wie wurde das dann im Tutorial gemacht? Es schien ja so mal funktioniert zu haben. Wurden mit der Zeit Libraries angepasst so das die Inkompabilität jetzt zustande kommt?
Enc := CharsetToEncoding(Request.CharSet);
|
AW: Indy 10 HTTP(S) Protokoll
Hallo,
du hast den Kommentar überlesen? // Request.CharSet vorher setzten: z.B: ISO-8859-1 |
AW: Indy 10 HTTP(S) Protokoll
Zitat:
Wird der ganz einfach mit
Delphi-Quellcode:
gesetzt oder muss ich da noch was beachten?
Request.CharSet := 'UTF-8';
*Edit: Auch wenn das Charset gesetzt wäre, also nur mal angenommen, so wäre es vom Typ immer noch IIdTextEncoding und damit noch inkompatibel zu TEncoding. Eine Idee, wie ich das beheben kann? |
AW: Indy 10 HTTP(S) Protokoll
Hallo,
da bin ich raus ;) Müsste mal auf Arbeit nachsehen, was ich da so gesetzt hatte. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:47 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 by Thomas Breitkreuz