Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Validate query param if it exists in Apigee edge

Hi,

I have a requirement to validate a query param if it exists in the url

Consider the below example

www.example.com/employees?name=alex

I wanted to check if query parameter 'name' exists in the url and if it exists check whether query parameter 'name' is passed as empty string or null. For example

www.example.com/employees?name

OR

www.example.com/employees?name=

 

I tried the request.queryparams.names, it gives the collection of params but I cant find a way to use it or loop it. Array.includes() on request.queryparams.names doesnt seem to work. Is there a way to convert request.queryparams.names to array or any other solution to this issue?

Thanks

 

 

 

 

 

0 1 1,229
1 REPLY 1
Top Solution Authors