How to handle REST API parameters in Template?

i.e. http://localhost:3000/func?para1=256&para2=512
func can be defined in helpers but how to translate REST parameters to javascript func?