Home > Back-end >  Predecessors delphi7 - idhttp - post (json format parameters) - visit HTTPS error
Predecessors delphi7 - idhttp - post (json format parameters) - visit HTTPS error

Time:09-20

[size=13 px] everyone a great god, components have tidhttp + IdSSLIOHandlerSocket1 younger brother for the first time to write this post to https://api.acewill.net incoming values for {" cno ":" 15268561755 "} have the properties of two controls at the bottom of the figure
But "every time a newspaper Error connecting with SSL." there are a few times is submitted to the socket Error # 11004 predecessors, please help me thank you,
The HTML code is as follows:

Procedure TForm1. Button1Click (Sender: TObject);
Var
Url: string;
Resstring: TStringStream;
Response: the string;
ResponseStr: string;

SSLopen: TIdSSLIOHandlerSocket;
Reqstr: TStringStream;
Tempstr, tempstr2, SJC: string;
The begin
Try
IdHTTP1:=TIdHTTP. Create (nil);
IdHTTP1. Request. ContentType:='application/json;
Resstring:=TStringStream. Create (");
Reqstr:=TStringStream. Create (");

SSLopen:=TIdSSLIOHandlerSocket. Create (IdHTTP1);
IdHTTP1. IOHandler:=SSLopen;
IdHTTP1. ReadTimeout:=50000;
//IdHTTP1. Request. Connection:='Keep - the Alive;
Try
Url:='https://api.acewill.net/user/account';
SJC:=Gettimestamp;//timestamp
Tempstr:='cno % 3 d15862536136 & amp; Appid=dp0DjvD81zqwJlOzxGfPjMJ & amp; Appkey=329 cad 81 ebabce4b1a6203a202959fb3 & amp; V=2.0 & amp; Ts='+ Gettimestamp +' ';
Tempstr2:=MD5Print (MD5String (tempstr));//generated sig signature
Tempstr:='the req={" cno ":" 15862536136 "} & amp; Appid=dp0DjvD81zqwJlOzxGfPjMJ & amp; V=2.0 & amp; Ts='+ Gettimestamp + & amp; Sig='+ tempstr2 + & amp; FMT=JSON ';

//submitted in the form of flow parameters
Resstring. Position:=0;
Reqstr. WriteString (tempstr);
IdHTTP1. Post (Url, reqstr, resstring);
Except,
On e: the Exception do
The begin
ShowMessage (e.M essage);
end;
end;
ResponseStr:=resstring. DataString;
ResponseStr:=UTF8Decode (ResponseStr);
Memo1. Text:=ResponseStr;
The finally
IdHTTP1. Free;
Resstring. Free;
Reqstr. Free;
end;
end;

CodePudding user response:

The top! D=====( ̄ del  ̄ *) b! D=====( ̄ del  ̄ *) b! D=====( ̄ del  ̄ *) b! D=====( ̄ del  ̄ *) b calls a great god

CodePudding user response:

Download two DLLS to your executable directory: libeay32. DLL and ssleay32. DLL
  • Related