# WGETVAR
Updated: 1/18/2021, 4:08:04 PM
Created: 1/18/2021, 4:08:04 PM
Last Updated By: Mike Street
Read Time: 1 minute(s)
The WGETVAR
subroutine allows you to retrieve variables (query string parameters) sent in the web request.
# WGETVAR Syntax
CALL WGETVAR(VARVALUE,VARNAME)
1
# Syntax Elements
Parameter | Description |
---|---|
VARVALUE | This is the returned value of the variable. |
VARNAME | This is a passed in parameter of the value you want retrieved. |
# WGETVAR Example
CALL WGETVAR(VAR1,"var1")
1
# WGETVAR 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
1
2
3
4
5
6
7
2
3
4
5
6
7