Home > Back-end >  IDHttp. Post can't get the data
IDHttp. Post can't get the data

Time:11-05

Procedure TForm1. Button1Click (Sender: TObject);
Var
SStr: string;
SStrs: TStringList;
//sPostData: TStringStream;
The begin
Try
FHttp. HandleRedirects:=True;//Idhttp
FHttp. Request. CustomHeaders. The Clear;
FHttp. Request. ContentType:='application/json;
FHttp. Request. CustomHeaders. Add (' ClientId=com. Primeton. Esb. Consumer. Mis');
FHttp. Request. CustomHeaders. Add (' OperationCode=esb. Nrec. Ecm. Edoc. File. Search ');
FHttp. Request. CustomHeaders. Add (" EmpNo=nrmes ");

SStrs:=TStringList. The Create ();
SStrs. Add (' {" data ": {" folderid" : "4398071", "filename" : "HAMUX08F"}} ");
Try
SStr:=FHttp. Post (' https://esb.nrec.com:9680/esb.nrec.ecm.edoc.file 'sStrs);
Showmessage (sStr);
Except,
On e: the exception do
The begin
Showmessage (e.m essage);
end;
end;
The finally
Freeandnil (sStrs);
end;
end;

I use the postman is access to data,

CodePudding user response:

Load the HTTPS site page content remember in the form with "IdSSLIOHandlerSocketOpenSSL1
"And inside idhttp IOHandler for "IdSSLIOHandlerSocketOpenSSL1
"
TIdSSLIOHandlerSocket controls need to OpenSSL Library to cooperate, the OpenSSL Library consists of two dynamic link Library

Libeay32. DLL and ssleay32. DLL, under the application directory,
OpenSSL Indy version download http://indy.fulgan.com/SSL/

CodePudding user response:

Suggest to use postman test code of the reentry after

CodePudding user response:

https://download.csdn.net/download/liu494021458/12083921
This does not need libeay32. DLL and ssleay32. DLL
Test delphi7 Delphi xe10.1 available
  • Related