[lp_client_params]

Description

Link: [lp_client_params]
Author: Bil Corry
Category: Client
Version: 8.x
License: Public Domain
Posted: Dec. 23, 2005
Updated: Mar. 31, 2008
More by this author...

Returns an array of GET/POST parameters passed from the client.

Parameters

-method string, optional -method='GET' for GET params, -method='POST' for POST params. Default is both.

Sample Usage

lp_client_params;
						

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[

define_tag:'lp_client_params',
	-description='Returns an array of GET/POST parameters passed from the client.',
	-priority='replace',
	-optional='method';
	
	local:'out' = array;

	if: (local:'method') == 'GET';
		#out->(merge: client_getparams);
	else: (local:'method' == 'POST');
		#out->(merge: client_postparams);
	else; // both
		#out->(merge: client_getparams);
		#out->(merge: client_postparams);
	/if;	

	// correct charset issue in LP8.5.5
	if: client_encoding != content_encoding;
		local('i'=null,'name'=null,'value'=null);
		iterate: #out, #i;
			if: #i->type == 'pair';
				#name = (bytes:#i->name,client_encoding);
				#value = (bytes:#i->value,client_encoding);
				#i = (pair: #name->(exportstring:content_encoding) = #value->(exportstring:content_encoding));
			else;
				#name = (bytes:#i,client_encoding);
				#i = #name->(exportstring:content_encoding);
			/if;
		/iterate;
	/if;

	return:#out;

/define_tag;

]

 

Related Tags



Comments

none

Email:


Password:



Newest

Most Popular