Hi, Thanks,

Is there a way to make getFoo() method use POST method? Even in form I 
specifiy <form action="foo" method="POST">
Stapler.currentRequest().getMethod() will still return "GET".
and @RequirePOST annotation will always fail

On Friday, September 9, 2016 at 4:13:05 PM UTC-7, Daniel Beck wrote:
>
>
> > On 09.09.2016, at 15:59, Cheng Bao <[email protected] <javascript:>> 
> wrote: 
> > 
> > However, what to do next? without StaplerRequest and StaplerResponse 
> parameters, after processing, how can display certain jelly file? how can I 
> make redirection to another url? 
> > How can I get query parameters as /foo/bar?query=xx? 
> > How can I get more part of url as /foo/bar1/bar2? 
>
> The object you return can have a doIndex method, or an index.jelly view. 
> Or, in the /foo/bar1/bar2 example, a bar2.jelly view. 
>
> I actually gave a presentation on this just a few days ago, and the 
> recording is at https://www.youtube.com/watch?v=iAJBKFe8mMo 
>
> You can access the current request object without changing your method 
> signature using the static Stapler.currentRequest() method. 
>
> Likewise with the response -- you should also be able to return and/or 
> throw a HttpResponse (there are predefined ones in HttpResponses) to 
> redirect. 
>
> Daniel 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/960c06e9-a539-4604-ba29-4d3e8b270940%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to