Atozed Forums

Full Version: How to call a URL from server without showing it to client?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm trying to call a URL that have a security information from server (IW ISAPI) to another server directly without executing a JS or open a new window at the client.

I Tried IdHTTP, and winnet without success. Both gives unkown error when executed from IW form. Is there is a way to make this call directly from the user session, wait for the results, and then move on accordingly?

I'm using IW 14.2.7 with D XE5


Thx in advance...
Mohamed
IdHTTP works fine from within a user session.

Please post concrete error messages. "without success" does not give us anything to go on.
(11-09-2018, 03:37 PM)kudzu Wrote: [ -> ]IdHTTP works fine from within a user session.

Please post concrete error messages. "without success" does not give us anything to go on.

Hi,

I dont have clear exception to trace. When I try the code form the user session, I get an exception on IdHTT.GET procedure, it asks for the source of IWForm.pas, and when i press ignore it takes me to the CPU debug window, and after run/F9, it it runs the finally porting with null response...

Any idea what is going wrong here?
Use a try..except and catch the exception to see it. The reason its likely asking for IWForm.pas is that you have no exception handler, but IW has ones in case users dont catch them and that is likely what is triggering the IDE.
(11-09-2018, 05:08 PM)kudzu Wrote: [ -> ]Use a try..except and catch the exception to see it. The reason its likely asking for IWForm.pas is that you have no exception handler, but IW has ones in case users dont catch them and that is likely what is triggering the IDE.

You are correct. The error is 'IOHandler value is not valid'

Any advise?

I think ifound the source of the problem. I'm using HTTPS, that requires IOHandles for the SSL/TLS to be assigned
(11-09-2018, 05:54 PM)mhammady Wrote: [ -> ]You are correct. The error is 'IOHandler value is not valid'

That error means you are requesting an HTTPS url, but the TIdHTTP.IOHandler property has not been assigned a TIdSSLIOHandlerSocketBase-derived component, such as TIdSSLIOHandlerSocketOpenSSL.

Note: if you are using a fairly up-to-date version of Indy from the past few years, TIdHTTP will usually handle that internally for you.

(11-09-2018, 05:54 PM)mhammady Wrote: [ -> ]I think ifound the source of the problem. I'm using HTTPS, that requires IOHandles for the SSL/TLS to be assigned

Yes.