Parameters

<< Click to Display Table of Contents >>

Navigation:  Forum >

Parameters

Forum link

 


 

01-08-2023, 10:58 AM:

 

I have developed a simple ISAPI program Intraweb 15 latest Delphi.

 

Deploys and work great this is the URL slightly changed: http://88.209.225.199:8092

 

I want to send parameters to the app when I start it.

 

I am sorry this must be so simple but I have been searching for hours for solution with no luck.

 

So how do I add parameters to that URL and how do I read them in Intraweb app

 

Thanks Mike

 


 

01-13-2023, 06:24 PM:

 

IW uses the standard structure for URL parameters, as below.

 

Note that URL parameters start with the "?" character, and each parameter is a pair of name and value

 

?param=value

 

Use the "&" character to send multiple parameters

 

Code:

 

http://88.209.225.199:8092/$/start?email=abc@website.com&used_id=1002

 

 

 

In your code, you read these values using WebApplication.RunParams(TStrings):

 

Code:

 

  if WebApplication.RunParams.IndexOfName('email') <> -1 then

 

  begin

 

    lEmail := WebApplication.RunParams.Values['email'];

 

  end;

 

  if WebApplication.RunParams.IndexOfName('user_id') <> -1 then

 

  begin

 

    lEmail := WebApplication.RunParams.Values['user_id'];

 

  end;

 

 

 


 

01-15-2023, 09:44 AM:

 

if I use http://88.209.225.199:8092/$/start?ct=1&cn=244&un=503 it just times out. If I use http://88.209.225.199:8092/$/start it works. I am not trying to read the parameters at this stage.

 

Can you see what I am doing wrong?

 

Thanks Mike

 

 

 

It suddenly started working! no idea what did. Thanks for all your help very concise answer..