Ah, that makes sense, i was assuming you simply wanted to have the whip follow the (unmodified) path. There are a couple of ways to achieve this, some harder but flexible, others more simple, but less flexible.
The hard way is to directly manipulate the path attachments vertices. I'd not recommend this as the vertex encoding is a bit complex, and converting between different coordinate spaces and taking into account vertex deformation can be a bit hard.
The simpler way is to IK constraint the end of your path to a control bone. You can then simply move the control bone around to position the end of your whip path in the direction you want. You can find an example of this in our vine demo (which is written in TypeScript, but the APIs are essentially the same). Here's the code that lets you drag around a bone via the mouse spine-runtimes/vine.js at master · EsotericSoftware/spine-runtimes · GitHub. You essentially convert the input coordinates to world coordinates, then adjust the position of the control bone accordingly. You can see the demo in action here Path Constraints - Spine Demo