I have implemented Action to create customized method url.
getURL(){ "sampleURL"}
doBuildNow(){//Method implementation}
So Here URL : http://hostserver/job/jobName/sampleURL/buildNow
I would like to use this method as POST which doesn't work by default, I didn't find any clue from google search. Can any one please help me on this.
In order to force a Jenkins action method to only accept a post, add the '@RequirePOST' annotation to the method.
This has the added benefit of automatically providing a 'Try POSTing' button when someone does a get via the browswer.
This is the behavior seen in Jenkins when accessing the '/exit' url.