Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

WGETVAR

The WGETVAR subroutine allows you to retrieve variables sent in the web request.  

COMMAND SYNTAX

CALL WGETVAR(VARVALUE,VARNAME)

SYNTAX ELEMENTS

ParameterDescription
VARVALUEThis is the returned value of the variable.
VARNAMEThis is a passed in parameter of the value you want retrieved.

EXAMPLE

CALL WGETVAR(VAR1,"var1")

NOTES

Only variables sent on the url bar or via x-www-form-urlencoded posts.  Form-Data encoding is not supported. Below is an example from POSTMAN

You can get a list of all supplied variables by call the WGETINFO subroutine and pass it 25.  

CALL WGETINFO(VARS, 25)
NUM.VARS=DCOUNT(VARS,@AM)
FOR V=1 TO NUM.VARS
   VAR.NAME=VARS<V>
   CALL WGETVAR(VAR.VALUE,VAR.NAME)
   PRINT VAR.NAME:" = ":VAR.VALUE
NEXT V



Was this article helpful?