# WGETVAR

Updated: 7/8/2020, 5:59:18 PM
Created: 7/8/2020, 5:59:18 PM
Last Updated By: Ryan Medina
Read Time: 1 minute(s)

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

# Command 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.

# Example

CALL WGETVAR(VAR1,"var1")
1

# 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

wgetvar: blob

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