# WGETVAR

Updated: 2/24/2021, 3:51:59 PM
Created: 2/24/2021, 3:51:59 PM
Last Updated By: Daniel Klein
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 calling the WGETINFO subroutine with a parameter of 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

Back to jAgent APIs