Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameters
#1
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
Reply
#2
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;
Reply
#3
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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)