Czym wykonac zapytanie https

0

Jak wykonac zapytanie https uzywajac komponentu http
albo socketow ?

Mam taki kod

Input := TStringStream.Create('');
        Output := TStringStream.Create('');
        Input.WriteString('?position=3433');
        Form1.http.Post('https://www.serwisowyjakiscos.pl/index.php',Input, Output);
        Form1.memo1.Lines.add(output.DataString);
        Input.Free;
        output.free;

No i na http dzialalo ale na https juz nie. W http ustawilem na port 443 ale pisze IoHandler not valid :/

0
  1. Wywaliłeś jakiś sobie kod bóg wie skąd.
    2.Nawet nie zajrzałeś do kompendium (jest na stronie).
    3.Pisałem na ten temat na forum i była odpowiedź.
  2. Używaj Google.pl i opcji szukaj...
    5.Proponuje poczytać coś o synapse (taki komponent)
    jeżeli chcesz to zrobić metodą POST o ile wiesz o co chodzi...
    łub metodą GET o wiele prościej i łatwiej ale nie wnikam czy tak możesz i czy się tak da w tym przypadku...
0

Dokładnie jak poprzednik pisał - Synapse rządzi i basta :P Z dobrodziejstw tego pakietu wielokrotnie korzystałem w
swoich aplikacjach do obsługi protokołu http, jednak nigdy https, ale jest to i tak możliwe. W dokumentacji napisano:

unction HTTPMethod(const Method, URL: string): Boolean;

Connects to host define in URL and access to resource defined in URL by method. If Document is not empty, send it to server as part of HTTP request. Server response is in Document and headers. Connection may be authorised by username and password in URL. If you define proxy properties, connection is made by this proxy. If all OK, result is True, else result is False.

If you use in URL 'https:' instead only 'http:', then your request is made by SSL/TLS connection (if you not specify port, then port 443 is used instead standard port 80). If you use SSL/TLS request and you have defined HTTP proxy, then HTTP-tunnel mode is automaticly used .

0

ten kod sam napialem kiedys :)
Ale rozeznam sie z tym Synapsem
Dziekuje

1 użytkowników online, w tym zalogowanych: 0, gości: 1