how to use multiple javascript policy as a single

I have a proxy as no target set their I added there post flow for addition , subtraction and multiply and attach respective javascript policy

11066-download.png

so use these different policy i want made a single javascript policy and do the same thing

like if i call /add endpoint then i will be call the associted javascript policy

0 2 68
2 REPLIES 2

It seems like to move to a single javascript file you would need to move the conditional logic to the javascript to know which type of operation to perform (add, subtract, multiply..). Your conditions in the javascript could be based on the request - refer to this list

could you please give it a example how can i route or move specfic endpoint to the scpecfic logic