Rest Service Call From Javascript Script

well, in that case I think @Robert_Ottohall has a valid suggestion to solve your problem.

Hope that helps,
Askar