Vely logo install examples
documentation about

14.2.0 released on Nov 29, 2022

input-param



PURPOSE:


Get input parameter.

SYNTAX:



input-param <name>


DESCRIPTION:


To obtain input parameters from an incoming request, use input-param. Whether it's a web or command-line application, input parameters are specified as name/value pairs (see request_URL). The value of input parameter <name> will be in the string variable with the same name. Input parameter values are trimmed for whitespace (both on left and right).

Input parameter name can be made up of alphanumeric characters, hyphen or underscore only and cannot start with a digit. Note that a hyphen is automatically converted to underscore, so an input parameter "some-parameter" in the HTTP request will be known in your code as "some_parameter". For example in URL:

http://<your web server>/<app name>/some-request?my-par1=val1&my-par2=val2

the request name will be "some_request" (handled by some_request.vely source code), and input parameters will be "my_par1" and "my_par2":

input-param my_par1
input-param my_par2


File uploads


File uploads are handled as input parameters as well, see file_uploading.

Using input parameters


As an example, for HTML form input parameters named "param1" with value "value1" and "param2" with value "value2":

<input type='hidden' name='param1' value='value1'>
<input type='hidden' name='param2' value='value2'>

you can get these parameters and print out their values by using:

input-param param1
input-param param2
p-web param1
p-web param2

the output of which is:

value1
value2

A request may be in the form of a web link URL, and getting the parameter values is the same:

http://<your web server>/<app name>/<request name>&param1=value1&param2=value2


Duplicate parameter names


If there are multiple input parameters with the same name, such as

http://<web address>/<app name>/<request name>?par=val1&par=val2

the value of input parameter "par" is undefined. Do not specify multiple input parameters with the same name.

SEE ALSO:


Request information ( get-req   input-param   request-body   set-req   url-param  )  SEE ALL (documentation)



Copyright (c) 2022 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Some icons copyright PaweĊ‚ Kuna licensed under MIT. Vely elephant logo copyright DaSoftver LLC. This web page is licensed under CC-BY-SA-4.0.